Title: [292034] trunk/Source/WebCore
Revision
292034
Author
brandonstew...@apple.com
Date
2022-03-29 08:54:21 -0700 (Tue, 29 Mar 2022)

Log Message

Check page exists before trying to access authenticatorCoordinator
https://bugs.webkit.org/show_bug.cgi?id=238507

Reviewed by Brent Fulgham.

Check we have a valid page before trying to access the authenticatorCoordinator.

* Modules/webauthn/PublicKeyCredential.cpp:
(WebCore::PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (292033 => 292034)


--- trunk/Source/WebCore/ChangeLog	2022-03-29 15:54:12 UTC (rev 292033)
+++ trunk/Source/WebCore/ChangeLog	2022-03-29 15:54:21 UTC (rev 292034)
@@ -1,3 +1,15 @@
+2022-03-29  Brandon Stewart  <brandonstew...@apple.com>
+
+        Check page exists before trying to access authenticatorCoordinator
+        https://bugs.webkit.org/show_bug.cgi?id=238507
+
+        Reviewed by Brent Fulgham.
+
+        Check we have a valid page before trying to access the authenticatorCoordinator.
+
+        * Modules/webauthn/PublicKeyCredential.cpp:
+        (WebCore::PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable):
+
 2022-03-29  Wenson Hsieh  <wenson_hs...@apple.com>
 
         HTMLAttachmentElement.getAttachmentIdentifier() should propagate attachment data to the client

Modified: trunk/Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp (292033 => 292034)


--- trunk/Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp	2022-03-29 15:54:12 UTC (rev 292033)
+++ trunk/Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp	2022-03-29 15:54:21 UTC (rev 292034)
@@ -66,7 +66,8 @@
 
 void PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable(Document& document, DOMPromiseDeferred<IDLBoolean>&& promise)
 {
-    document.page()->authenticatorCoordinator().isUserVerifyingPlatformAuthenticatorAvailable(WTFMove(promise));
+    if (auto* page = document.page())
+        page->authenticatorCoordinator().isUserVerifyingPlatformAuthenticatorAvailable(WTFMove(promise));
 }
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to