diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-11-17 13:10:15 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-11-17 13:39:13 +0100 |
commit | 8595b76df2fa5c0e536dd37456943162a154d4da (patch) | |
tree | 089939e57eb3175db4bc46f959afd7d9eaddc1b6 /lib/private/share | |
parent | 9df50c7be6ee47620af83c52ac340ac00d92042c (diff) | |
download | nextcloud-server-8595b76df2fa5c0e536dd37456943162a154d4da.tar.gz nextcloud-server-8595b76df2fa5c0e536dd37456943162a154d4da.zip |
Remove phpass and migrate to new Hasher interface
This PR removes phpass and migrates to the new Hasher interface.
Please notice that due to https://github.com/owncloud/core/issues/10671 old hashes are not updated but the hashes are backwards compatible so this shouldn't hurt.
Once the sharing classes have a possibility to update the passwords of single shares those methods should be used within the newHash if block.
Diffstat (limited to 'lib/private/share')
-rw-r--r-- | lib/private/share/share.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php index b7b05dab8ef..0cd715c6dd1 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -627,9 +627,7 @@ class Share extends \OC\Share\Constants { // Generate hash of password - same method as user passwords if (!empty($shareWith)) { - $forcePortable = (CRYPT_BLOWFISH != 1); - $hasher = new \PasswordHash(8, $forcePortable); - $shareWith = $hasher->HashPassword($shareWith.\OC_Config::getValue('passwordsalt', '')); + $shareWith = \OC::$server->getHasher()->hash($shareWith); } else { // reuse the already set password, but only if we change permissions // otherwise the user disabled the password protection |