summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/Share20/Manager.php2
-rw-r--r--tests/lib/Share20/ManagerTest.php6
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index 3afd38c579f..7bed012fe8f 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -734,7 +734,7 @@ class Manager implements IManager {
}
$plainTextPassword = null;
- if ($share->getShareType() === \OCP\Share::SHARE_TYPE_LINK || $share->getShareType() === \OCP\Share::SHARE_TYPE_EMAIL) {
+ if ($share->getShareType() === \OCP\Share::SHARE_TYPE_EMAIL) {
// Password updated.
if ($share->getPassword() !== $originalShare->getPassword()) {
//Verify the password
diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php
index 7de73421d3e..6a389fcdf9a 100644
--- a/tests/lib/Share20/ManagerTest.php
+++ b/tests/lib/Share20/ManagerTest.php
@@ -2520,6 +2520,12 @@ class ManagerTest extends \Test\TestCase {
$manager->expects($this->once())->method('canShare')->willReturn(true);
$manager->expects($this->once())->method('getShareById')->with('foo:42')->willReturn($originalShare);
$manager->expects($this->once())->method('validateExpirationDate')->with($share);
+ $manager->expects($this->once())->method('verifyPassword')->with('password');
+
+ $this->hasher->expects($this->once())
+ ->method('hash')
+ ->with('password')
+ ->willReturn('hashed');
$this->defaultProvider->expects($this->once())
->method('update')