You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove share permissions on mount points failure #13306
The file lib/private/files/view.php generates the following error when a user without share permissions but with a file or a folder shared with him views his filesystem root.
PHP Undefined variable: content at [...]/lib/private/files/view.php#1030
The error is generated when Owncloud tries to remove share permissions for the file. Looks like a bad copy-paste issue ;)
I would replace this line (view.php, line 1030) $content['permissions'] = $content['permissions'] & ~\OCP\PERMISSION_SHARE;
with this one $rootEntry['permissions'] = $rootEntry['permissions'] & ~\OCP\PERMISSION_SHARE;
It's not such a problem for me because I do not allow resharing, it just fills my log file with errors. However, it could be a problem for other people if some of their users have more rights than expected.
I wonder if this is even the correct behavior.
If I remember well it might not even be necessary to remove the share permission here as it will be masked later.
Enable "disable sharing for groups" and select "group1" for the exclusion
Login as "user2"
Share folder "test" with "user1"
Login as "user1"
Make sure to delete all files like "welcome.txt" and only leave the "test" folder (this is to make sure that $content is not defined)
Result:
{"reqId":"q3Kk1SpdkQ+3W9zS9KXe","remoteAddr":"127.0.0.1","app":"PHP","message":"Undefined variable: content at \/srv\/www\/htdocs\/owncloud\/lib\/private\/files\/view.php#1357","level":3,"time":"2015-08-07T13:46:44+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/list.php?dir=%2F&sort=name&sortdirection=asc"}
Activity
PVince81 commentedon Jan 14, 2015
Would you like to send a pull request to contribute this change ?
CC @schiesbn who added the line
PVince81 commentedon Jul 31, 2015
I wonder if this is even the correct behavior.
If I remember well it might not even be necessary to remove the share permission here as it will be masked later.
Maybe @icewind1991 remembers it?
Else your fix seems valid.
PVince81 commentedon Aug 7, 2015
Steps to reproduce
Result:
PVince81 commentedon Aug 7, 2015
Fix is here #18124