-
Notifications
You must be signed in to change notification settings - Fork 2.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
Shares should have a least read permission #14570
Conversation
Thanks a lot! @icewind1991 @DeepDiver1975 @schiesbn FYI @jnfrmarks @dragotin |
Looks good 👍 |
@@ -279,6 +279,10 @@ public static function createShare($params) { | |||
return new \OC_OCS_Result(null, 400, "unknown share type"); | |||
} | |||
|
|||
if (($permissions & \OCP\Constants::PERMISSION_READ) == 0) { |
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.
===
instead? (same below)
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.
Yep should have been ===.
Fixed
In MySQL env:
|
* Throw 400 when a share is created or updated without read permissions * Added unit tests
The inspection completed: 2 new issues, 2 updated code elements |
Refer to this link for build results (access rights to CI server needed): |
Fixed issues and unit tests. Seem like or friends are happier now :) |
👍 |
Shares should have a least read permission
As requested in #14548