Skip to content
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

Add share type to the verifyExpirationDate hook #37135

Merged
merged 2 commits into from
Mar 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions changelog/unreleased/37135
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Bugfix: Add share type to the verifyExpirationDate hook

The verifyExpirationDate hook notifies the password_policy app about proposed
expiration dates of shares. The share type was not being passed in the hook.
This meant that the password_policy app incorrectly processed user and group
share expiration dates. See the linked issue for details.
The problem has been corrected.

https://github.com/owncloud/password_policy/issues/287
https://github.com/owncloud/core/pull/37135
1 change: 1 addition & 0 deletions lib/private/Share20/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ protected function validateExpirationDate(\OCP\Share\IShare $share) {
'accepted' => &$accepted,
'message' => &$message,
'passwordSet' => $share->getPassword() !== null,
'shareType' => $share->getShareType(),
]);

if (!$accepted) {
Expand Down