From 7cbf2bc56df4519868e8694fd3ead4700aec7642 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Tue, 8 Sep 2015 17:53:29 +0200 Subject: [PATCH] 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 --- lib/private/share/share.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 70ed26c0b2..6ad36d60fe 100644 --- a/lib/private/share/share.php +++ b/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 {