-
Notifications
You must be signed in to change notification settings - Fork 88
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
[stable29] fix(trash): Fix deleting items from public share with write access #3628
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When no user in session, use an empty string as deleted_by, which shows as "Unknown" in the UI. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
the deletion succeeds but there is some issue with viewing the deleted files in the owner's view. this seems like it would require some work to backport. It is fine if we skip it. {"reqId":"vwgb3nUllB7OX5rmBcbx","level":3,"time":"2025-02-18T11:03:20+00:00","remoteAddr":"192.168.21.7","user":"admin","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/trashbin/admin/trash/","message":"/admin/files_trashbin/groupfolders/1","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36","version":"29.0.12.2","exception":{"Exception":"OCP\\Files\\NotFoundException","Message":"/admin/files_trashbin/groupfolders/1","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Files/Node/LazyFolder.php","line":161,"function":"get","class":"OC\\Files\\Node\\Root","type":"->","args":["/admin/files_trashbin/groupfolders/1"]},{"file":"/var/www/html/apps-extra/groupfolders/lib/Trash/TrashBackend.php","line":432,"function":"get","class":"OC\\Files\\Node\\LazyFolder","type":"->","args":["/admin/files_trashbin/groupfolders/1"]},{"file":"/var/www/html/apps-extra/groupfolders/lib/Trash/TrashBackend.php","line":89,"function":"getTrashForFolders","class":"OCA\\GroupFolders\\Trash\\TrashBackend","type":"->","args":[{"__class__":"OC\\User\\User"},[{"folder_id":1,"mount_point":"gf","permissions":31,"quota":-3,"acl":false,"0":"And 1 more entries, set log level to debug to see all entries"}]]},{"file":"/var/www/html/apps/files_trashbin/lib/Trash/TrashManager.php","line":47,"function":"listTrashRoot","class":"OCA\\GroupFolders\\Trash\\TrashBackend","type":"->","args":[{"__class__":"OC\\User\\User"}]},{"function":"OCA\\Files_Trashbin\\Trash\\{closure}","class":"OCA\\Files_Trashbin\\Trash\\TrashManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/files_trashbin/lib/Trash/TrashManager.php","line":48,"function":"array_reduce","args":[{"OCP\\Files\\Storage\\IStorage":{"__class__":"OCA\\Files_Trashbin\\Trash\\LegacyTrashBackend"},"OCA\\GroupFolders\\Mount\\GroupFolderStorage":"*** sensitive parameters replaced ***"},{"__class__":"Closure"},"*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/files_trashbin/lib/Sabre/TrashRoot.php","line":75,"function":"listTrashRoot","class":"OCA\\Files_Trashbin\\Trash\\TrashManager","type":"->","args":[{"__class__":"OC\\User\\User"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php","line":218,"function":"getChildren","class":"OCA\\Files_Trashbin\\Sabre\\TrashRoot","type":"->","args":[]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":900,"function":"getChildren","class":"Sabre\\DAV\\Tree","type":"->","args":["trashbin/admin/trash"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":982,"function":"generatePathNodes","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\DAV\\PropFind"},[{"__class__":"Sabre\\DAV\\PropFind"},{"__class__":"OCA\\Files_Trashbin\\Sabre\\TrashRoot"}]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1662,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->","args":["trashbin/admin/trash",["{http://nextcloud.org/ns}trashbin-deletion-time","{http://nextcloud.org/ns}trashbin-original-location","{http://nextcloud.org/ns}trashbin-title","{DAV:}getcontentlength","{DAV:}getcontenttype","And 21 more entries, set log level to debug to see all entries"],1]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1647,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\Xml\\Writer","elementMap":"*** sensitive parameters replaced ***","contextUri":"/remote.php/dav/","namespaceMap":{"DAV:":"d","http://sabredav.org/ns":"s","http://owncloud.org/ns":"oc","http://nextcloud.org/ns":"nc"},"classMap":"*** sensitive parameters replaced ***"},{"__class__":"Generator"},false]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":346,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Generator"},false]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PROPFIND",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Server.php","line":67,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":396,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":172,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Files/Node/Root.php","Line":212,"message":"/admin/files_trashbin/groupfolders/1","exception":{},"CustomMessage":"/admin/files_trashbin/groupfolders/1"}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Manual backport of #3604
In 29 we don't have the
deleted_by
column we add, so I only had to remove the check for the user.