mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 19:25:43 +00:00
f7a8b4c054
The published recommendation of L1 for WebAuthn changed the visibility/focus listening behaviors to a SHOULD [1], and Chromium, for reasons like our SoftU2F bug [0], opted to not interrupt on tabswitch/visibility change. Let's do the same thing. This changes the visibility mechanism to set a flag on an ongoing transaction, and then, upon multiple calls to the FIDO/U2F functions, only aborts if visibility had changed. Otherwise, subsequent callers return early. This is harder to explain than it is really to use as a user. I think. At least, my testing feels natural when I'm working within two windows, both potentially prompting WebAuthn. Note: This also affects FIDO U2F API. [0] https://bugzilla.mozilla.org/show_bug.cgi?id=1448408#c0 [1] https://www.w3.org/TR/webauthn-1/#abortoperation Differential Revision: https://phabricator.services.mozilla.com/D25160 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
browser | ||
pkijs | ||
.eslintrc.js | ||
frame_appid_facet_insecure.html | ||
frame_appid_facet_subdomain.html | ||
frame_appid_facet.html | ||
frame_multiple_keys.html | ||
frame_no_token.html | ||
frame_override_request.html | ||
frame_register_sign.html | ||
frame_register.html | ||
frame_utils.js | ||
mochitest.ini | ||
README.md | ||
test_appid_facet_insecure.html | ||
test_appid_facet_subdomain.html | ||
test_appid_facet.html | ||
test_multiple_keys.html | ||
test_no_token.html | ||
test_override_request.html | ||
test_register_sign.html | ||
test_register.html | ||
test_util_methods.html | ||
u2futil.js |
Note:
While conceptually similar to the tests for Web Authentication (dom/webauthn),
the tests for U2F require an iframe while window.u2f
remains hidden behind a
preference, though WebAuthn does not. The reason is that the window
object
doesn't mutate upon a call by SpecialPowers.setPrefEnv() the way that the
navigator
objects do, rather you have to load a different page with a different
window
object for the preference change to be honored.