-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add hidden user folder #29886
Add hidden user folder #29886
Conversation
added a function get generate the folder name and added a dot prefix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of tests would be awesome 🙈
there might be more yeah, would be good to add maybe integration tests for this to confirm that all file operations are denied there or at least that the folder is protected in some way |
|
|
cc132a8
to
1a437b1
Compare
nextcloud/activity#698 for the activity path
This is intentional yes
I think this is ok, due to the "random" name it's very unlikely that a user hits this by accident, and being able to browse the hidden folder on purpose is fine since it's not a security feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From reading the code:
- What if the user creates a folder with the same name as the hidden folder but in a subfolder.
/
/.hidden_azeudhazud <-- real hidden folder
/sub_folder
/sub_folder/.hidden_azeudhazud <-- user creates this folder that should maybe not be hidden.
If I get this right, the created folder will be considered as hidden by FileSystem::isPathHidden
.
Is this intended behaviour?
It makes sense if userA
share his root folder with userB
/ <-- userB's root folder
/.hidden_azeudhazud <-- userB's hidden folder
/usera_shared_root_folder <-- what the name says
/usera_shared_root_folder/.hidden_azeudhazud <-- userA's hidden folder that should be hidden
1a437b1
to
bbc4e4b
Compare
bbc4e4b
to
7927445
Compare
this can be used by apps to have apps that are within the users home folder but are hidden from the normal ui bits Signed-off-by: Robin Appelman <[email protected]>
Signed-off-by: Robin Appelman <[email protected]>
Signed-off-by: Robin Appelman <[email protected]>
Signed-off-by: Robin Appelman <[email protected]>
7927445
to
77bbbf7
Compare
this can be used by apps to have apps that are within the users home folder but are hidden from the normal ui bits.
Currently, the "hidden" part is achieved in the dav plugin excluding it from listing and file search excluding results inside it.
I had originally hoped to have the "hidden" logic be more low level instead of having to implement it separately in each api by my attempts for that didn't work out as they would defeat the purpose of the folder in the first place (having it accessible trough normal endpoints by path and fileid)