Title: [293433] trunk/Source/WebKit
- Revision
- 293433
- Author
- [email protected]
- Date
- 2022-04-26 11:16:52 -0700 (Tue, 26 Apr 2022)
Log Message
[WebAuthn] Do not pass ASCCredentialRequestTypePlatform... if LocalService unavailable
https://bugs.webkit.org/show_bug.cgi?id=239746
rdar://91981865
Reviewed by Brent Fulgham.
Passing platform in requestTypes breaks the UI in registerations with the syncing platform
authenticator off and local service is unavailable. This patch stops passing it in this case.
* UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:
(WebKit::configureRegistrationRequestContext):
(WebKit::WebAuthenticatorCoordinatorProxy::performRequest):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (293432 => 293433)
--- trunk/Source/WebKit/ChangeLog 2022-04-26 18:09:57 UTC (rev 293432)
+++ trunk/Source/WebKit/ChangeLog 2022-04-26 18:16:52 UTC (rev 293433)
@@ -1,3 +1,18 @@
+2022-04-26 J Pascoe <[email protected]>
+
+ [WebAuthn] Do not pass ASCCredentialRequestTypePlatform... if LocalService unavailable
+ https://bugs.webkit.org/show_bug.cgi?id=239746
+ rdar://91981865
+
+ Reviewed by Brent Fulgham.
+
+ Passing platform in requestTypes breaks the UI in registerations with the syncing platform
+ authenticator off and local service is unavailable. This patch stops passing it in this case.
+
+ * UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:
+ (WebKit::configureRegistrationRequestContext):
+ (WebKit::WebAuthenticatorCoordinatorProxy::performRequest):
+
2022-04-26 Simon Fraser <[email protected]>
Fix crashes under RemoteLayerBackingStore::applyBackingStoreToLayer()
Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm (293432 => 293433)
--- trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm 2022-04-26 18:09:57 UTC (rev 293432)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm 2022-04-26 18:16:52 UTC (rev 293433)
@@ -221,6 +221,8 @@
shouldRequireResidentKey = authenticatorSelection->requireResidentKey;
residentKeyRequirement = authenticatorSelection->residentKey;
}
+ if (!LocalService::isAvailable())
+ requestTypes &= ~ASCCredentialRequestTypePlatformPublicKeyRegistration;
auto requestContext = adoptNS([allocASCCredentialRequestContextInstance() initWithRequestTypes:requestTypes]);
[requestContext setRelyingPartyIdentifier:options.rp.id];
@@ -428,6 +430,10 @@
void WebAuthenticatorCoordinatorProxy::performRequest(RetainPtr<ASCCredentialRequestContext> requestContext, RequestCompletionHandler&& handler)
{
+ if (requestContext.get().requestTypes == ASCCredentialRequestTypeNone) {
+ handler({ }, (AuthenticatorAttachment)0, ExceptionData { NotAllowedError, "This request has been cancelled by the user."_s });
+ return;
+ }
m_proxy = adoptNS([allocASCAgentProxyInstance() init]);
#if PLATFORM(MAC) || PLATFORM(MACCATALYST)
if ([requestContext respondsToSelector:@selector(requestStyle)] && requestContext.get().requestStyle == ASCredentialRequestStyleAutoFill) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes