[WebAuthN] InvalidStateError should be reported to sites
authorjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 May 2019 23:09:39 +0000 (23:09 +0000)
committerjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 May 2019 23:09:39 +0000 (23:09 +0000)
commitda17cca4e4d94083c3cd5cca7bbec2ea7179827f
treec1a157aa3dbd1e7aa724e60cc43e76845f834437
parent3dcf1e9a661b321832fb0236d0a85a624bdfc84c
[WebAuthN] InvalidStateError should be reported to sites
https://bugs.webkit.org/show_bug.cgi?id=193269
<rdar://problem/48298264>

Reviewed by Brent Fulgham.

Source/WebKit:

This patch implements step 20 about InvalidStateError of the spec:
https://www.w3.org/TR/webauthn/#createCredential.

* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::AuthenticatorManager::respondReceived):
* UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp:
(WebKit::CtapHidAuthenticator::continueMakeCredentialAfterResponseReceived const):

LayoutTests:

* http/wpt/webauthn/ctap-hid-failure.https.html:
* http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https-expected.txt:
* http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html:
* http/wpt/webauthn/public-key-credential-create-failure-hid.https-expected.txt:
* http/wpt/webauthn/public-key-credential-create-failure-hid.https.html:
* http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https.html:
* http/wpt/webauthn/resources/util.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/wpt/webauthn/ctap-hid-failure.https.html
LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https-expected.txt
LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html
LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-hid.https-expected.txt
LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-hid.https.html
LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https.html
LayoutTests/http/wpt/webauthn/resources/util.js
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp
Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp