summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-11-20 14:59:59 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2014-11-20 14:59:59 +0100
commitcbb9caf03083cc083491e292143ee53871920106 (patch)
treea36fbfa95a4cfb0a3d5bd6cfb1e35f7062d85aea /lib
parent46e610479514787d114ea519a4d70982413d152e (diff)
parent8595b76df2fa5c0e536dd37456943162a154d4da (diff)
downloadnextcloud-server-cbb9caf03083cc083491e292143ee53871920106.tar.gz
nextcloud-server-cbb9caf03083cc083491e292143ee53871920106.zip
Merge pull request #12226 from owncloud/remove-phpass
Remove phpass and migrate to new Hasher interface
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php3
-rw-r--r--lib/private/share/share.php4
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/base.php b/lib/base.php
index c97c158a1fb..9353de5588a 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -464,8 +464,7 @@ class OC {
// setup 3rdparty autoloader
$vendorAutoLoad = OC::$THIRDPARTYROOT . '/3rdparty/autoload.php';
if (file_exists($vendorAutoLoad)) {
- $loader = require_once $vendorAutoLoad;
- $loader->add('PasswordHash', OC::$THIRDPARTYROOT . '/3rdparty/phpass');
+ require_once $vendorAutoLoad;
} else {
OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
OC_Template::printErrorPage('Composer autoloader not found, unable to continue.');
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index cd5decf6f71..a8febc9aca7 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -633,9 +633,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