Title: [290950] branches/safari-613-branch/Source/WebKit
- Revision
- 290950
- Author
- [email protected]
- Date
- 2022-03-07 14:11:06 -0800 (Mon, 07 Mar 2022)
Log Message
Cherry-pick r290758. rdar://problem/89710486
[AppSSO] Correct logging messages to avoid confusing screeners that an error has occurred
https://bugs.webkit.org/show_bug.cgi?id=237390
<rdar://problem/89710486>
Reviewed by Simon Fraser.
The phrasing of the message in 'SOAuthorizationCoordinator::tryAuthorize' when a URL is not relevant for
AppSSO flows is:
AUTHORIZATIONCOORDINATOR_RELEASE_LOG("tryAuthorize: Cannot authorize the requested URL.");
This leads people spelunking logs to believe that the URL can't be authorized (perhaps due to an error).
Instead, we should more accurately report that the URL is not one that is mediated through an AppSSO flow,
and so no AppSSO processing is needed.
* UIProcess/Cocoa/SOAuthorization/SOAuthorizationCoordinator.mm:
(WebKit::SOAuthorizationCoordinator::tryAuthorize):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-613-branch/Source/WebKit/ChangeLog (290949 => 290950)
--- branches/safari-613-branch/Source/WebKit/ChangeLog 2022-03-07 22:11:04 UTC (rev 290949)
+++ branches/safari-613-branch/Source/WebKit/ChangeLog 2022-03-07 22:11:06 UTC (rev 290950)
@@ -1,5 +1,52 @@
2022-03-07 Russell Epstein <[email protected]>
+ Cherry-pick r290758. rdar://problem/89710486
+
+ [AppSSO] Correct logging messages to avoid confusing screeners that an error has occurred
+ https://bugs.webkit.org/show_bug.cgi?id=237390
+ <rdar://problem/89710486>
+
+ Reviewed by Simon Fraser.
+
+ The phrasing of the message in 'SOAuthorizationCoordinator::tryAuthorize' when a URL is not relevant for
+ AppSSO flows is:
+
+ AUTHORIZATIONCOORDINATOR_RELEASE_LOG("tryAuthorize: Cannot authorize the requested URL.");
+
+ This leads people spelunking logs to believe that the URL can't be authorized (perhaps due to an error).
+
+ Instead, we should more accurately report that the URL is not one that is mediated through an AppSSO flow,
+ and so no AppSSO processing is needed.
+
+ * UIProcess/Cocoa/SOAuthorization/SOAuthorizationCoordinator.mm:
+ (WebKit::SOAuthorizationCoordinator::tryAuthorize):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-02 Brent Fulgham <[email protected]>
+
+ [AppSSO] Correct logging messages to avoid confusing screeners that an error has occurred
+ https://bugs.webkit.org/show_bug.cgi?id=237390
+ <rdar://problem/89710486>
+
+ Reviewed by Simon Fraser.
+
+ The phrasing of the message in 'SOAuthorizationCoordinator::tryAuthorize' when a URL is not relevant for
+ AppSSO flows is:
+
+ AUTHORIZATIONCOORDINATOR_RELEASE_LOG("tryAuthorize: Cannot authorize the requested URL.");
+
+ This leads people spelunking logs to believe that the URL can't be authorized (perhaps due to an error).
+
+ Instead, we should more accurately report that the URL is not one that is mediated through an AppSSO flow,
+ and so no AppSSO processing is needed.
+
+ * UIProcess/Cocoa/SOAuthorization/SOAuthorizationCoordinator.mm:
+ (WebKit::SOAuthorizationCoordinator::tryAuthorize):
+
+2022-03-07 Russell Epstein <[email protected]>
+
Cherry-pick r290755. rdar://problem/89700242
[WebAuthn] Completion handler is not called when WebAuthn invoked without proper entitlements
Modified: branches/safari-613-branch/Source/WebKit/UIProcess/Cocoa/SOAuthorization/SOAuthorizationCoordinator.mm (290949 => 290950)
--- branches/safari-613-branch/Source/WebKit/UIProcess/Cocoa/SOAuthorization/SOAuthorizationCoordinator.mm 2022-03-07 22:11:04 UTC (rev 290949)
+++ branches/safari-613-branch/Source/WebKit/UIProcess/Cocoa/SOAuthorization/SOAuthorizationCoordinator.mm 2022-03-07 22:11:06 UTC (rev 290950)
@@ -42,6 +42,7 @@
#import <wtf/Function.h>
#define AUTHORIZATIONCOORDINATOR_RELEASE_LOG(fmt, ...) RELEASE_LOG(AppSSO, "%p - SOAuthorizationCoordinator::" fmt, this, ##__VA_ARGS__)
+#define AUTHORIZATIONCOORDINATOR_RELEASE_LOG_ERROR(fmt, ...) RELEASE_LOG_ERROR(AppSSO, "%p - SOAuthorizationCoordinator::" fmt, this, ##__VA_ARGS__)
namespace WebKit {
@@ -67,7 +68,7 @@
{
AUTHORIZATIONCOORDINATOR_RELEASE_LOG("tryAuthorize");
if (!canAuthorize(navigationAction->request().url())) {
- AUTHORIZATIONCOORDINATOR_RELEASE_LOG("tryAuthorize: Cannot authorize the requested URL.");
+ AUTHORIZATIONCOORDINATOR_RELEASE_LOG("tryAuthorize: The requested URL is not registered for AppSSO handling. No further action needed.");
completionHandler(false);
return;
}
@@ -76,7 +77,7 @@
auto* targetFrame = navigationAction->targetFrame();
bool subframeNavigation = targetFrame && !targetFrame->isMainFrame();
if (subframeNavigation && (!page.mainFrame() || ![AKAuthorizationController isURLFromAppleOwnedDomain:page.mainFrame()->url()])) {
- AUTHORIZATIONCOORDINATOR_RELEASE_LOG("tryAuthorize: Attempting to perform subframe navigation for non-Apple authorization URL.");
+ AUTHORIZATIONCOORDINATOR_RELEASE_LOG_ERROR("tryAuthorize: Attempting to perform subframe navigation for non-Apple authorization URL.");
completionHandler(false);
return;
}
@@ -88,13 +89,25 @@
void SOAuthorizationCoordinator::tryAuthorize(Ref<API::NavigationAction>&& navigationAction, WebPageProxy& page, NewPageCallback&& newPageCallback, UIClientCallback&& uiClientCallback)
{
AUTHORIZATIONCOORDINATOR_RELEASE_LOG("tryAuthorize (2)");
+ if (!canAuthorize(navigationAction->request().url())) {
+ AUTHORIZATIONCOORDINATOR_RELEASE_LOG("tryAuthorize (2): The requested URL is not registered for AppSSO handling. No further action needed.");
+ uiClientCallback(WTFMove(navigationAction), WTFMove(newPageCallback));
+ return;
+ }
+
bool subframeNavigation = navigationAction->sourceFrame() && !navigationAction->sourceFrame()->isMainFrame();
- if (subframeNavigation || !navigationAction->isProcessingUserGesture() || !canAuthorize(navigationAction->request().url())) {
- AUTHORIZATIONCOORDINATOR_RELEASE_LOG("tryAuthorize (2): Attempting to perform invalid auth.");
+ if (subframeNavigation) {
+ AUTHORIZATIONCOORDINATOR_RELEASE_LOG_ERROR("tryAuthorize (2): Attempting to perform subframe navigation.");
uiClientCallback(WTFMove(navigationAction), WTFMove(newPageCallback));
return;
}
+ if (!navigationAction->isProcessingUserGesture()) {
+ AUTHORIZATIONCOORDINATOR_RELEASE_LOG_ERROR("tryAuthorize (2): Attempting to perform auth without a user gesture.");
+ uiClientCallback(WTFMove(navigationAction), WTFMove(newPageCallback));
+ return;
+ }
+
auto session = PopUpSOAuthorizationSession::create(m_soAuthorization.get(), page, WTFMove(navigationAction), WTFMove(newPageCallback), WTFMove(uiClientCallback));
[m_soAuthorizationDelegate setSession:WTFMove(session)];
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes