Merge branch 'new-cloud' of https://github.com/cycomachead/snap into gh-pages

upd4.2
Bernat Romagosa 2018-02-07 09:20:02 +01:00
commit 5c6a3c44ad
2 zmienionych plików z 25 dodań i 21 usunięć

Wyświetl plik

@ -247,7 +247,7 @@ Cloud.prototype.login = function (username, password, persist, onSuccess, onErro
onError, onError,
'login failed', 'login failed',
'false', // wants raw response 'false', // wants raw response
password // password travels inside the body hex_sha512(password) // password travels inside the body
); );
}; };
@ -256,8 +256,8 @@ Cloud.prototype.signup = function (username, password, passwordRepeat, email, on
'POST', 'POST',
'/users/' + username + '?' + this.encodeDict({ '/users/' + username + '?' + this.encodeDict({
email: email, email: email,
password: password, password: hex_sha512(password),
password_repeat: passwordRepeat password_repeat: hex_sha512(passwordRepeat)
}), }),
onSuccess, onSuccess,
onError, onError,
@ -268,9 +268,9 @@ Cloud.prototype.changePassword = function (password, newPassword, passwordRepeat
this.withCredentialsRequest( this.withCredentialsRequest(
'POST', 'POST',
'/users/%username/newpassword?' + this.encodeDict({ '/users/%username/newpassword?' + this.encodeDict({
oldpassword: password, oldpassword: hex_sha512(password),
password_repeat: passwordRepeat, password_repeat: hex_sha512(passwordRepeat),
newpassword: newPassword newpassword: hex_sha512(newPassword)
}), }),
onSuccess, onSuccess,
onError, onError,
@ -501,4 +501,4 @@ Cloud.prototype.updateNotes = function (projectName, notes, onSuccess, onError)
); );
}; };
var SnapCloud = new Cloud('https://104.131.28.71'); var SnapCloud = new Cloud('https://snap-cloud.cs10.org');

Wyświetl plik

@ -3925,6 +3925,10 @@ Translation Updates:
* Turkish * Turkish
* Chinese * Chinese
* Spanish * Spanish
=== development ===
* New cloud API
* Russian * Russian
*** in development *** *** in development ***