Repository navigation
share: show directory structure - #880
Conversation
|
This looks great overall. I might just make a few minor tweaks before merging (e.g. variable names). I've also improved the sanitization logic on master which should help here (not a security issue though, since Nextcloud already sanitizes input everywhere)
We can deal with this if something comes up later.
Hmm we can't; that route is given to us. Maybe it's better to use a query parameter for the path in this case? What do you think?
Weird. Does this happen sporadically? |
|
One important point: we need to make sure the folders the user sees in here are sharable (best to only get folders on the same internal storage). Shared folders, e.g. might not allow resharing. |
|
FYI I'm working on merging this; so we don't get a conflict |
Left this as-is. No biggie.
I confirmed Nextcloud doesn't let you folders with shares in them. This PR doesn't change any behavior here so we can deal with this later if needed. Thanks for the PR! 🎉 |
|
Thank you for this fast revue/merge! |
|
Thanks to you! More contributions are always welcome 😄 |
Implemented feature request #324
Security considerations
API endpoint
/api/folders/subis now marked as@PublicPage, but I removed thepathinformation from the returned data. This was the absolute path, revealing the name of folders outside the share. The web client now compute the path by itself, see bellow.Some points to check before merging
childis in a folderparent, the web client assumes that its path is{parent path}/{child name}. Looking at the code that was present before, it seems that it may not be always the case? Maybe?/s/{token}/authenticate/{redirect}is in conflict with/s/{token}/{path}. It's only an issue if you refresh the page on a directory which parent is namedauthenticate, which parent is the share root. So it's highly unlikely that this will cause any issue, but it's cleaner if it's addressed. How can we re-organise the routes?412because of a failed CFRS check, but I don't really understand this issue.