-
-
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
[stable29] fix(share_api): Respect requested permissions or error out #49606
base: stable29
Are you sure you want to change the base?
Conversation
c401885
to
a0b10ae
Compare
Tests related to I am not sure if that parameter is useful in the context of the new sharing UI. CC: @artonge |
if ($this->shareManager->outgoingServer2ServerSharesAllowed()) { | ||
$permissions |= Constants::PERMISSION_SHARE; | ||
} |
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 might break federation
The share API currently always adds read permissions sent in share request with the argument that all shares must have read permissions. That this not true as link and email shares allowed not to. In addition to the above, there is a check that ensures any share which is not a link or email share must have read permissions. There is also protection for legacy integrations where if no permissions are sent at all default permissions are set. So it does not make sense to make any sort of additions to the permissions that a client has sent, as the response would be different from what the client expects. Signed-off-by: nfebe <[email protected]>
a0b10ae
to
5ed3db9
Compare
Why is this PR against stable 29 ? |
This is related to a bug that more visible on 29 with "File drop" when the client sends File requests on 30, sends 4 but the client would handle 20 as still a file request. That works, it continues to build on incorrect complexity? |
The share API currently always adds read permissions sent in share request with the argument that all shares must have read permissions. That this not true as link and email shares allowed not to.
In addition to the above, there is a check that ensures any share which is not a link or email share must have read permissions. There is also protection for legacy integrations where if no permissions are sent at all default permissions are set.
So it does not make sense to make any sort of additions to the permissions that a client has sent, as the response would be different from what the client expects.