diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-04-12 09:46:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-12 09:46:31 +0200 |
commit | 483741ff36ab5ce56d37f65226b76afffb858356 (patch) | |
tree | a50478ba2112ef95d8899ce8d994c1b27a49cdf7 /lib/private/Share20/Manager.php | |
parent | 4626bfbc83c3b5779d6688c0b9357514e08799ed (diff) | |
parent | c6a5c07041d2e5d20771409aede8b755d28372ac (diff) | |
download | nextcloud-server-483741ff36ab5ce56d37f65226b76afffb858356.tar.gz nextcloud-server-483741ff36ab5ce56d37f65226b76afffb858356.zip |
Merge pull request #31220 from nextcloud/enhancement/31005/temporary-passwords
Temporary passwords for public non-anonymous protected shares (ie: files shared with an email recipient).
Diffstat (limited to 'lib/private/Share20/Manager.php')
-rw-r--r-- | lib/private/Share20/Manager.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 3fca9e3fe14..4e87c37fedb 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1552,6 +1552,12 @@ class Manager implements IManager { return false; } + // Makes sure password hasn't expired + $expirationTime = $share->getPasswordExpirationTime(); + if ($expirationTime !== null && $expirationTime < new \DateTime()) { + return false; + } + $newHash = ''; if (!$this->hasher->verify($password, $share->getPassword(), $newHash)) { return false; |