Permalink
Browse files

Bug 1300297 - Ensure FxA device id is cleared on password change. r=m…

…arkh

--HG--
extra : rebase_source : 8dd0d1110340525407accf0a6173e09275c90a67
  • Loading branch information...
1 parent e45cb15 commit 6b63924827a58a443943d143c718b79c0e253975 @philbooth philbooth committed Sep 3, 2016
@@ -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;

0 comments on commit 6b63924

Please sign in to comment.