mirror of
https://github.com/nextcloud/server.git
synced 2026-07-05 12:34:39 +02:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user