|
@@ 612-616 (lines=5) @@
|
| 609 |
|
$this->validateExpirationDate($share); |
| 610 |
|
|
| 611 |
|
//Verify the password |
| 612 |
|
if ($this->passwordMustBeEnforced($share->getPermissions()) && $share->getPassword() === null) { |
| 613 |
|
throw new \InvalidArgumentException('Passwords are enforced for link shares'); |
| 614 |
|
} else { |
| 615 |
|
$this->verifyPassword($share->getPassword()); |
| 616 |
|
} |
| 617 |
|
|
| 618 |
|
// If a password is set. Hash it! |
| 619 |
|
if ($share->getPassword() !== null) { |
|
@@ 839-843 (lines=5) @@
|
| 836 |
|
if ($share->getPassword() !== $originalShare->getPassword() || |
| 837 |
|
$share->getPermissions() !== $originalShare->getPermissions()) { |
| 838 |
|
//Verify the password. Permissions must be taken into account in case the password must be enforced |
| 839 |
|
if ($this->passwordMustBeEnforced($share->getPermissions()) && $share->getPassword() === null) { |
| 840 |
|
throw new \InvalidArgumentException('Passwords are enforced for link shares'); |
| 841 |
|
} else { |
| 842 |
|
$this->verifyPassword($share->getPassword(), $share->getPermissions()); |
| 843 |
|
} |
| 844 |
|
|
| 845 |
|
// If a password is set. Hash it! (only if the password has changed) |
| 846 |
|
if ($share->getPassword() !== null && $share->getPassword() !== $originalShare->getPassword()) { |