summaryrefslogtreecommitdiffstats
path: root/services/fxaccounts/tests/xpcshell/test_keys.js
diff options
context:
space:
mode:
Diffstat (limited to 'services/fxaccounts/tests/xpcshell/test_keys.js')
-rw-r--r--services/fxaccounts/tests/xpcshell/test_keys.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/services/fxaccounts/tests/xpcshell/test_keys.js b/services/fxaccounts/tests/xpcshell/test_keys.js
index 9a25ca90f3..5caa4679c6 100644
--- a/services/fxaccounts/tests/xpcshell/test_keys.js
+++ b/services/fxaccounts/tests/xpcshell/test_keys.js
@@ -219,6 +219,18 @@ add_task(function test_check_valid_scoped_keys() {
};
Assert.equal(keys.validScopedKeys(scopedKeys), true);
});
+ add_task(function test_valid_kid_with_dash() {
+ const scopedKeys = {
+ "https://identity.mozilla.com/apps/oldsync": {
+ kty: "oct",
+ // kid contains another dash. The fingerprint must not be truncated.
+ kid: "1510726318123-I-Qv4onc7VcVE1kTQkyyOw",
+ k: "DW_ll5GwX6SJ5GPqJVAuMUP2t6kDqhUulc2cbt26xbTcaKGQl-9l29FHAQ7kUiJETma4s9fIpEHrt909zgFang",
+ scope: "https://identity.mozilla.com/apps/oldsync",
+ },
+ };
+ Assert.equal(keys.validScopedKeys(scopedKeys), true);
+ });
});
add_task(async function test_rejects_bad_scoped_key_data() {