-
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
Fix exception on external storages public links when encryption enabled #41246
base: master
Are you sure you want to change the base?
Conversation
Quality Gate passedIssues Measures |
There was an additional problem according to https://github.com/owncloud/enterprise/issues/6626#issuecomment-2084853496 , is it solved? or will it be fixed later? |
I guess we can try to fix it here. But I don't quite get why we are not getting into https://github.com/owncloud/core/blob/master/lib/private/Preview.php#L1229-L1231 as |
https://github.com/owncloud/core/blob/master/lib/private/Files/View.php#L1475 The case where the user is |
AFAICT from https://github.com/owncloud/core/blob/master/lib/private/Preview.php#L1228 we get |
Note: a changelog was added by #41247 but was named https://github.com/owncloud/core/blob/master/changelog/unreleased/41246 So that is why there is a conflict here! I made #41248 to fix that. |
@pako81 is this ready to go into 10.15.0? |
After 10.15.0 - converting to draft for now. |
Description
Having masterkey encryption enabled, when trying to upload into a public link created on an external storage (i.e. of type "Local" or "WND") being assigned to at least one user/group, an exception
Attempted to initialize mount points for null user and no user in session
is being thrown and no upload is possible.Related Issue
Motivation and Context
There was a problem around https://github.com/owncloud/core/blob/master/lib/private/Encryption/Util.php#L303 as the
uid
provided to the method isfalse
in this case. This happens because the external storage doesn't really have an owner and there is no user in the session. Therefore, when checking forisMountPointApplicableToUser
, the provided user isfalse
which will never find a match, so the mount point isn't considered system wide.How Has This Been Tested?
admin
admin
creates a public link on the external storage rootAttempted to initialize mount points for null user and no user in session
is shown and file cannot be uploadedadmin
after the storage has been mounted into oC fails withFile cannot be downloaded
and same exception in logsTypes of changes
Checklist: