Title: [293786] trunk/Source/WebKit
Revision
293786
Author
j_pas...@apple.com
Date
2022-05-04 13:28:40 -0700 (Wed, 04 May 2022)

Log Message

[WebAuthn] Remove user gesture requirement for mediation=conditional assertions
https://bugs.webkit.org/show_bug.cgi?id=240038
rdar://92137603

Reviewed by Brent Fulgham.

Conditional assertions are non-modal and already require a gesture to complete via
a different mechanism.

Tested manually on device.

* UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:
(WebKit::configurationAssertionRequestContext):
* UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp:
(WebKit::WebAuthenticatorCoordinatorProxy::handleRequest):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (293785 => 293786)


--- trunk/Source/WebKit/ChangeLog	2022-05-04 20:22:05 UTC (rev 293785)
+++ trunk/Source/WebKit/ChangeLog	2022-05-04 20:28:40 UTC (rev 293786)
@@ -1,3 +1,21 @@
+2022-05-04  J Pascoe  <j_pas...@apple.com>
+
+        [WebAuthn] Remove user gesture requirement for mediation=conditional assertions
+        https://bugs.webkit.org/show_bug.cgi?id=240038
+        rdar://92137603
+
+        Reviewed by Brent Fulgham.
+
+        Conditional assertions are non-modal and already require a gesture to complete via
+        a different mechanism.
+
+        Tested manually on device.
+
+        * UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:
+        (WebKit::configurationAssertionRequestContext):
+        * UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp:
+        (WebKit::WebAuthenticatorCoordinatorProxy::handleRequest):
+
 2022-05-04  Brent Fulgham  <bfulg...@apple.com>
 
         Remove deprecated 'JavaEnabled' feature flag and related code

Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm (293785 => 293786)


--- trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm	2022-05-04 20:22:05 UTC (rev 293785)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm	2022-05-04 20:28:40 UTC (rev 293786)
@@ -321,8 +321,11 @@
 
     auto requestContext = adoptNS([allocASCCredentialRequestContextInstance() initWithRequestTypes:requestTypes]);
     [requestContext setRelyingPartyIdentifier:options.rpId];
-    if (mediation == MediationRequirement::Conditional && [requestContext respondsToSelector:@selector(setRequestStyle:)])
+    if (mediation == MediationRequirement::Conditional) {
+        if (![requestContext respondsToSelector:@selector(setRequestStyle:)])
+            return nil;
         requestContext.get().requestStyle = ASCredentialRequestStyleAutoFill;
+    }
     setGlobalFrameIDForContext(requestContext, globalFrameID);
 
     if (requestTypes & ASCCredentialRequestTypePlatformPublicKeyAssertion) {

Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp (293785 => 293786)


--- trunk/Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp	2022-05-04 20:22:05 UTC (rev 293785)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp	2022-05-04 20:28:40 UTC (rev 293786)
@@ -107,7 +107,7 @@
             handler({ }, (AuthenticatorAttachment)0, ExceptionData { NotAllowedError, "This request has been cancelled by the user."_s });
     };
     
-    if (!data.processingUserGesture && !m_webPageProxy.websiteDataStore().authenticatorManager().isVirtual())
+    if (!data.processingUserGesture && data.mediation != MediationRequirement::Conditional && !m_webPageProxy.websiteDataStore().authenticatorManager().isVirtual())
         m_webPageProxy.uiClient().requestWebAuthenticationNoGesture(origin, WTFMove(afterConsent));
     else
         afterConsent(true);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to