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:
Lukas Reschke 2015-09-08 17:53:29 +02:00
parent 73d3839962
commit 7cbf2bc56d
1 changed files with 1 additions and 1 deletions

View File

@ -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 {