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
remotes/origin/db-empty-migrate
Lukas Reschke 11 years ago
parent 73d3839962
commit 7cbf2bc56d
  1. 2
      lib/private/share/share.php

@ -765,7 +765,7 @@ class Share extends Constants {
}
// Generate hash of password - same method as user passwords
if (!empty($shareWith)) {
if (is_string($shareWith) && $shareWith !== '') {
self::verifyPassword($shareWith);
$shareWith = \OC::$server->getHasher()->hash($shareWith);
} else {

Loading…
Cancel
Save