From bc7aad7e3cac6b85bd9116dd92a4bb7b0b560246 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Tue, 17 Mar 2020 17:37:28 +0300 Subject: [PATCH 1/2] Add share type to the verifyExpirationDate hook --- lib/private/Share20/Manager.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index d8ec2c21c503..34f58733ce72 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -469,6 +469,7 @@ protected function validateExpirationDate(\OCP\Share\IShare $share) { 'accepted' => &$accepted, 'message' => &$message, 'passwordSet' => $share->getPassword() !== null, + 'shareType' => $share->getShareType(), ]); if (!$accepted) { From e4d16f04f57810ca17741e2d9ddf058607df5667 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 18 Mar 2020 09:15:21 +0545 Subject: [PATCH 2/2] Add changelog for verifyExpirationDate hook change --- changelog/unreleased/37135 | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 changelog/unreleased/37135 diff --git a/changelog/unreleased/37135 b/changelog/unreleased/37135 new file mode 100644 index 000000000000..fb9d7075bc30 --- /dev/null +++ b/changelog/unreleased/37135 @@ -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