feature(auth) password: sha1 -> sha512WithRSAEncryption

This commit is contained in:
coderaiser 2014-11-03 09:19:38 -05:00
parent ca32b296c3
commit 1c3a97fbad
3 changed files with 4 additions and 4 deletions

View file

@ -1,7 +1,7 @@
{
"auth": false,
"username": "root",
"password": "435b41068e8665513a20070c033b08b9c66e4332",
"password": "2b64f2e3f9fee1942af9ff60d40aa5a719db33b8ba8dd4864bb4f11e25ca2bee00907de32a59429602336cac832c8f2eeff5177cc14c864dd116c8bf6ca5d9a9",
"analytics": true,
"diff": true,
"zip" : true,

View file

@ -40,7 +40,7 @@
name = config('username'),
passwd = config('password'),
equal = username === name,
sha = crypto.createHash('sha1');
sha = crypto.createHash('sha512');
if (!oldPass)
oldPass = passwd;
@ -56,7 +56,7 @@
equal = passwd === hash && equal;
if (!equal) {
sha = crypto.createHash('sha1');
sha = crypto.createHash('sha512WithRSAEncryption');
sha.update(oldPass);
hash = sha.digest('hex');
equal = passwd === hash && equal;

View file

@ -101,7 +101,7 @@
var data = '',
json = Util.json.parse(body) || {},
passwd = json.password,
sha = crypto.createHash('sha1');
sha = crypto.createHash('sha512WithRSAEncryption');
if (error) {
callback(error);