Changeset 287957 in webkit
- Timestamp:
- Jan 12, 2022 3:45:51 PM (6 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-la-no-mock.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r287955 r287957 1 2022-01-12 J Pascoe <j_pascoe@apple.com> 2 3 [WebAuthn] Fix freebie call without user gesture not being given 4 https://bugs.webkit.org/show_bug.cgi?id=235078 5 rdar://87327557 6 7 Reviewed by Brent Fulgham. 8 9 This logic was previously always requiring a user gesture. The desired 10 behavior of giving pages a single "freebie" webauthn call without gesture 11 was lost in a refactor. 12 13 Tested manually on iOS device with webauthn.me. 14 15 * WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp: 16 (WebKit::WebAuthenticatorCoordinator::processingUserGesture): 17 1 18 2022-01-12 Brandon Stewart <brandonstewart@apple.com> 2 19 -
trunk/Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp
r286785 r287957 127 127 { 128 128 auto processingUserGesture = UserGestureIndicator::processingUserGestureForMedia(); 129 if (!processingUserGesture && m_requireUserGesture) 129 bool processingUserGestureOrFreebie = processingUserGesture || !m_requireUserGesture; 130 if (!processingUserGestureOrFreebie) 130 131 m_webPage.addConsoleMessage(frameID, MessageSource::Other, MessageLevel::Warning, "User gesture is not detected. To use the WebAuthn API, call 'navigator.credentials.create' or 'navigator.credentials.get' within user activated events."_s); 132 131 133 if (processingUserGesture && m_requireUserGesture) 132 134 m_requireUserGesture = false; 133 else 135 else if (!processingUserGesture) 134 136 m_requireUserGesture = true; 135 return processingUserGesture || !m_requireUserGesture;137 return processingUserGestureOrFreebie; 136 138 } 137 139 -
trunk/Tools/ChangeLog
r287956 r287957 1 2022-01-12 J Pascoe <j_pascoe@apple.com> 2 3 [WebAuthn] Fix freebie call without user gesture not being given 4 https://bugs.webkit.org/show_bug.cgi?id=235078 5 rdar://87327557 6 7 Reviewed by Brent Fulgham. 8 9 Updated API test to reflect user gesture freebie. 10 11 * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-la-no-mock.html: 12 1 13 2022-01-12 Elliott Williams <emw@apple.com> 2 14 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-la-no-mock.html
r260983 r287957 21 21 22 22 navigator.credentials.create(options).then(credential => { 23 // console.log("Succeeded!");24 23 window.webkit.messageHandlers.testHandler.postMessage("Succeeded!"); 25 24 }, error => { 26 // console.log(error.message); 25 // The first call will consume the freebie, the second will give the no user gesture error. 26 navigator.credentials.create(options).then(credential => { 27 window.webkit.messageHandlers.testHandler.postMessage("Succeeded!"); 28 }, error => { 29 window.webkit.messageHandlers.testHandler.postMessage(error.message); 30 }); 27 31 window.webkit.messageHandlers.testHandler.postMessage(error.message); 28 32 });
Note: See TracChangeset
for help on using the changeset viewer.