mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1300297 - Ensure FxA device id is cleared on password change. r=markh
--HG-- extra : rebase_source : 8dd0d1110340525407accf0a6173e09275c90a67
This commit is contained in:
parent
e45cb1544d
commit
6b63924827
@ -333,7 +333,9 @@ this.FxAccountsWebChannelHelpers.prototype = {
|
||||
// features (ie, new fields) - forcing the server to track a map of
|
||||
// versions to supported field names doesn't buy us much.
|
||||
// So we just remove field names we know aren't handled.
|
||||
let newCredentials = {};
|
||||
let newCredentials = {
|
||||
deviceId: null
|
||||
};
|
||||
for (let name of Object.keys(credentials)) {
|
||||
if (name == "email" || name == "uid" || FxAccountsStorageManagerCanStoreField(name)) {
|
||||
newCredentials[name] = credentials[name];
|
||||
|
@ -414,6 +414,8 @@ add_task(function* test_helpers_change_password() {
|
||||
do_check_true(credentials.hasOwnProperty("email"));
|
||||
do_check_true(credentials.hasOwnProperty("uid"));
|
||||
do_check_true(credentials.hasOwnProperty("kA"));
|
||||
do_check_true(credentials.hasOwnProperty("deviceId"));
|
||||
do_check_null(credentials.deviceId);
|
||||
// "foo" isn't a field known by storage, so should be dropped.
|
||||
do_check_false(credentials.hasOwnProperty("foo"));
|
||||
wasCalled.updateUserAccountData = true;
|
||||
|
Loading…
Reference in New Issue
Block a user