summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Share20/Manager.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index 73860fd39f4..f88d884c0db 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -972,8 +972,14 @@ class Manager implements IManager {
} else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_LINK) {
$this->linkCreateChecks($share);
+ $plainTextPassword = $share->getPassword();
+
$this->updateSharePasswordIfNeeded($share, $originalShare);
+ if (empty($plainTextPassword) && $share->getSendPasswordByTalk()) {
+ throw new \InvalidArgumentException('Can’t enable sending the password by Talk with an empty password');
+ }
+
if ($share->getExpirationDate() != $originalShare->getExpirationDate()) {
//Verify the expiration date
$this->validateExpirationDate($share);