Skip to content

PUT can hide /profile/card with intermediary containers #1743

@Otto-AA

Description

@Otto-AA

Problem

When (accidentically) PUTting /profile/card/somedocument, NSS will automatically create the intermediary container /profile/card/. This will result in a situation, where /profile/ contains both the document /profile/card and the folder /profile/card/. See eg https://penny.vincenttunru.com/explore/?url=https%3A%2F%2Fthispoddoesnotexist.solidcommunity.net%2Fprofile%2F

From here on, requests to the WebId will always be redirected to the /profile/card/ folder. You can test this by clicking on the resources in penny, or manually opening them in the browser.

First seen here: https://forum.solidproject.org/t/working-with-multiple-pod-providers/7015/14

Reproduction

  1. Create a pod
  2. Login with the normal mashlib UI
  3. Execute this PUT request in the browser console (or do the PUT request with a different tool):
await window.UI.authn.authSession.fetch('https://thispoddoesnotexist.solidcommunity.net/profile/card/recipes', {
  method: 'PUT',
  headers: { 'Content-Type': 'text/plain' },
  body: 'Pasta + Salsa',
})

Fix suggestion

I'm not sure if the specification covers this case. I guess the PUT should fail with a conflict, if an intermediary container would have the same name as an already existing resource.

Feel free to delete the pod I've used for testing, or just leave it. There is no other data on it :)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions