mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 532570 - "keyring doesn't contain a key" when signing-in with a differently-cased username
Make sure username is always lowercase so that pubkey uri, storage uri, etc. are all the same no matter how the user logged in. Server needs to be wiped to make sure existing keys with other casing are removed.
This commit is contained in:
parent
835dcd80cf
commit
0da867fd27
@ -85,7 +85,7 @@ Identity.prototype = {
|
|||||||
// Look up the password then cache it
|
// Look up the password then cache it
|
||||||
if (this._password == null)
|
if (this._password == null)
|
||||||
for each (let login in this._logins)
|
for each (let login in this._logins)
|
||||||
if (login.username == this.username)
|
if (login.username.toLowerCase() == this.username)
|
||||||
this._password = login.password;
|
this._password = login.password;
|
||||||
return this._password;
|
return this._password;
|
||||||
},
|
},
|
||||||
|
@ -108,11 +108,14 @@ WeaveSvc.prototype = {
|
|||||||
_keyPair: {},
|
_keyPair: {},
|
||||||
|
|
||||||
get username() {
|
get username() {
|
||||||
return Svc.Prefs.get("username", "");
|
return Svc.Prefs.get("username", "").toLowerCase();
|
||||||
},
|
},
|
||||||
set username(value) {
|
set username(value) {
|
||||||
if (value)
|
if (value) {
|
||||||
|
// Make sure all uses of this new username is lowercase
|
||||||
|
value = value.toLowerCase();
|
||||||
Svc.Prefs.set("username", value);
|
Svc.Prefs.set("username", value);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
Svc.Prefs.reset("username");
|
Svc.Prefs.reset("username");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user