Allow 0 and false as password
When we use the check for "empty" here passwords such as 0 will not work. Fixes https://github.com/owncloud/password_policy/issues/8
This commit is contained in:
parent
73d3839962
commit
7cbf2bc56d
|
@ -765,7 +765,7 @@ class Share extends Constants {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate hash of password - same method as user passwords
|
// Generate hash of password - same method as user passwords
|
||||||
if (!empty($shareWith)) {
|
if (is_string($shareWith) && $shareWith !== '') {
|
||||||
self::verifyPassword($shareWith);
|
self::verifyPassword($shareWith);
|
||||||
$shareWith = \OC::$server->getHasher()->hash($shareWith);
|
$shareWith = \OC::$server->getHasher()->hash($shareWith);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue