mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature(auth) password: sha1 -> sha512WithRSAEncryption
This commit is contained in:
parent
ca32b296c3
commit
1c3a97fbad
3 changed files with 4 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"auth": false,
|
||||
"username": "root",
|
||||
"password": "435b41068e8665513a20070c033b08b9c66e4332",
|
||||
"password": "2b64f2e3f9fee1942af9ff60d40aa5a719db33b8ba8dd4864bb4f11e25ca2bee00907de32a59429602336cac832c8f2eeff5177cc14c864dd116c8bf6ca5d9a9",
|
||||
"analytics": true,
|
||||
"diff": true,
|
||||
"zip" : true,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue