bug 556683 - password reset URL is hardcoded, r=Mardak

This commit is contained in:
Mike Connor 2010-04-08 17:03:10 -04:00
Родитель ff2b435a77
Коммит 4f5f1a7edb
3 изменённых файлов: 5 добавлений и 12 удалений

Просмотреть файл

@ -85,7 +85,7 @@
<!ENTITY manageAccount.accesskey "A">
<!ENTITY changePassword.label "Change Password">
<!ENTITY recoverPassword.label "Recover Password">
<!ENTITY resetPassword.label "Reset Password">
<!ENTITY changePassphrase.label "Change Secret Phrase">
<!ENTITY resetSync.label "Reset Sync">
<!ENTITY cancelResetSync.label "Cancel Reset Sync">

Просмотреть файл

@ -165,6 +165,10 @@ WeaveSvc.prototype = {
return user + "1.0/";
},
get pwResetURL() {
return this.serverURL + "weave-password-reset";
},
get syncID() {
// Generate a random syncID id we don't have one
let syncID = Svc.Prefs.get("client.syncID", "");
@ -604,16 +608,6 @@ WeaveSvc.prototype = {
return true;
}))(),
requestPasswordReset: function WeaveSvc_requestPasswordReset(username) {
let res = new Resource(Svc.Prefs.get("pwChangeURL"));
res.authenticator = new NoOpAuthenticator();
res.headers['Content-Type'] = 'application/x-www-form-urlencoded';
let ret = res.post('uid=' + username);
if (ret.indexOf("Further instructions have been sent") >= 0)
return true;
return false;
},
startOver: function() {
// Set a username error so the status message shows "set up..."
Status.login = Weave.LOGIN_FAILED_NO_USERNAME;

Просмотреть файл

@ -2,7 +2,6 @@ pref("extensions.weave.serverURL", "@server_url@");
pref("extensions.weave.storageAPI", "1.0");
pref("extensions.weave.userURL", "user/");
pref("extensions.weave.miscURL", "misc/");
pref("extensions.weave.pwChangeURL", "https://auth.services.mozilla.com/weave-password-reset");
pref("extensions.weave.termsURL", "https://mozillalabs.com/weave/tos/");
pref("extensions.weave.lastversion", "firstrun");