diff --git a/json/config.json b/json/config.json index 045a1cc6..a0c8bbad 100644 --- a/json/config.json +++ b/json/config.json @@ -1,7 +1,7 @@ { "auth": false, "username": "root", - "password": "435b41068e8665513a20070c033b08b9c66e4332", + "password": "2b64f2e3f9fee1942af9ff60d40aa5a719db33b8ba8dd4864bb4f11e25ca2bee00907de32a59429602336cac832c8f2eeff5177cc14c864dd116c8bf6ca5d9a9", "analytics": true, "diff": true, "zip" : true, diff --git a/lib/server/auth.js b/lib/server/auth.js index 877371f2..6d557d3f 100644 --- a/lib/server/auth.js +++ b/lib/server/auth.js @@ -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; diff --git a/lib/server/config.js b/lib/server/config.js index c65effff..3887cb68 100644 --- a/lib/server/config.js +++ b/lib/server/config.js @@ -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);