aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Share20/Manager.php
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-03-18 17:12:28 +0100
committerVincent Petry <vincent@nextcloud.com>2021-03-18 17:12:28 +0100
commita9e3d2a10fe4926691065fe9a76e48e6a7e32a08 (patch)
tree27ca35db8ab0ed5ca6293fe968bf0a2d5b9cef5c /lib/private/Share20/Manager.php
parenta186d084713fa494eea94febf2d585a34222b992 (diff)
downloadnextcloud-server-a9e3d2a10fe4926691065fe9a76e48e6a7e32a08.tar.gz
nextcloud-server-a9e3d2a10fe4926691065fe9a76e48e6a7e32a08.zip
Update user share must use correct expiration validation
Updating a user or group share now uses the correct method for the validation of the expiration date. Instead of using the one from links it uses the one for internal shares. To avoid future confusion, the method "validateExpirationDate" has been renamed to "validateExpirationDateLink". Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'lib/private/Share20/Manager.php')
-rw-r--r--lib/private/Share20/Manager.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index ce1ec1d60f6..1c875ad0c0a 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -459,7 +459,7 @@ class Manager implements IManager {
* @throws \InvalidArgumentException
* @throws \Exception
*/
- protected function validateExpirationDate(IShare $share) {
+ protected function validateExpirationDateLink(IShare $share) {
$expirationDate = $share->getExpirationDate();
if ($expirationDate !== null) {
@@ -763,7 +763,7 @@ class Manager implements IManager {
);
//Verify the expiration date
- $share = $this->validateExpirationDate($share);
+ $share = $this->validateExpirationDateLink($share);
//Verify the password
$this->verifyPassword($share->getPassword());
@@ -975,7 +975,7 @@ class Manager implements IManager {
if ($share->getExpirationDate() != $originalShare->getExpirationDate()) {
//Verify the expiration date
- $this->validateExpirationDate($share);
+ $this->validateExpirationDateInternal($share);
$expirationDateUpdated = true;
}
} elseif ($share->getShareType() === IShare::TYPE_GROUP) {
@@ -983,7 +983,7 @@ class Manager implements IManager {
if ($share->getExpirationDate() != $originalShare->getExpirationDate()) {
//Verify the expiration date
- $this->validateExpirationDate($share);
+ $this->validateExpirationDateInternal($share);
$expirationDateUpdated = true;
}
} elseif ($share->getShareType() === IShare::TYPE_LINK) {
@@ -999,7 +999,7 @@ class Manager implements IManager {
if ($share->getExpirationDate() != $originalShare->getExpirationDate()) {
//Verify the expiration date
- $this->validateExpirationDate($share);
+ $this->validateExpirationDateLink($share);
$expirationDateUpdated = true;
}
} elseif ($share->getShareType() === IShare::TYPE_EMAIL) {