-
-
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
Fix incorrect if conditions in View #31754
Conversation
Could you add a bit more info in the commit message about what this fix and why the previous code was incorrect? |
adf4bc1
to
dcd2a68
Compare
Done. |
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.
This probably only make a difference when you can't read a file but still have permission to do other stuff (file drop)
Could we take the opportunity to exit early on this condition instead of wrapping 100 lines into the if: https://github.com/nextcloud/server/blob/dcd2a6841e9f1f111f74c9f6006c3821bfb12e3d/lib/private/Files/View.php#L1446= |
Done |
/rebase |
/backport to stable23 |
/backport to stable22 |
($something->getPermissions() && Constants::PERMISSION_READ) does not make sense as PERMISSION_READ contant is 1 this will always evaluate to true. getPersmissions is returning an int which is a bitwise combination as documented in the interface, so it should be used with bit operators. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
be6c7ba
to
d36a1a7
Compare
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
The backport to stable23 failed. Please do this backport manually. |
The backport to stable22 failed. Please do this backport manually. |
/backport to stable23 |
/backport to stable22 |
The backport to stable22 failed. Please do this backport manually. |
The backport to stable23 failed. Please do this backport manually. |
Signed-off-by: Côme Chilliet come.chilliet@nextcloud.com