diff --git a/lib/server/auth.js b/lib/server/auth.js index 6f767eda..334cd758 100644 --- a/lib/server/auth.js +++ b/lib/server/auth.js @@ -8,7 +8,6 @@ tryRequire = require(DIR + 'tryRequire', {log: true}), config = require(DIR + 'config'), Util = require(DIR_LIB + 'util'), - isDeprecatedShown, oldPass, oldName; @@ -63,28 +62,9 @@ equal = pass === hash && equal; } - if (!equal) { - equal = oldSha(password, pass); - - if (equal && !isDeprecatedShown) { - console.error('Change password: sha1 is not safe. New passwords would be saved in config in sha512+RSA'); - isDeprecatedShown = true; - } - } - callback(equal); }); return auth; } - - function oldSha(password, hash) { - var hashNew, - sha = crypto.createHash('sha1'); - - sha.update(password); - hashNew = sha.digest('hex'); - - return hash === hashNew; - } })();