| Summary: | Issue logging in to Microsoft Teams if logged into other Microsoft accounts and navigating directly to teams.microsoft.com | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Kate Cheney <katherine_cheney> | ||||||||
| Component: | WebKit Misc. | Assignee: | Kate Cheney <katherine_cheney> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | achristensen, bfulgham, cdumez, ews-watchlist, japhet, wilander | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Kate Cheney
2020-12-03 12:54:10 PST
Created attachment 415331 [details]
Patch
Comment on attachment 415331 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=415331&action=review I think this looks correct. r=me > Source/WebCore/ChangeLog:21 > + reboot loop will occur because the site has login credentials from a previous Reboot? Or just endless redirect (I suspect the latter!) Comment on attachment 415331 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=415331&action=review > Source/WebCore/ChangeLog:28 > + (WebCore::FrameLoader::receivedFirstData): DocumentLoader::responseReceived might be a better place for this. > Source/WebCore/page/Quirks.cpp:982 > +bool Quirks::isMicrosoftTeamsRedirectCase(const URL& url) "Case" -> "URL"? > Source/WebCore/page/Quirks.cpp:984 > + return url.string().contains("teams.microsoft.com") && url.query().toString().contains("Retried+3+times+without+success"); Could we check the host instead of the whole url? I'd rather not match https://example.com/teams.microsoft.com?Retried+3+times+without+success > Source/WebCore/page/Quirks.cpp:987 > +URL Quirks::microsoftTeamsRedirectURL() I'm not sure this URL should be in Quirks. (In reply to Brent Fulgham from comment #2) > Comment on attachment 415331 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=415331&action=review > > I think this looks correct. r=me Thanks for looking. I will hold off based on Alex's r-. > > > Source/WebCore/ChangeLog:21 > > + reboot loop will occur because the site has login credentials from a previous > > Reboot? Or just endless redirect (I suspect the latter!) Oops! Will fix in the next upload. (In reply to Alex Christensen from comment #3) > Comment on attachment 415331 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=415331&action=review > > > Source/WebCore/ChangeLog:28 > > + (WebCore::FrameLoader::receivedFirstData): > > DocumentLoader::responseReceived might be a better place for this. > Ok, I'll move it there instead. > > Source/WebCore/page/Quirks.cpp:982 > > +bool Quirks::isMicrosoftTeamsRedirectCase(const URL& url) > > "Case" -> "URL"? > Will change. > > Source/WebCore/page/Quirks.cpp:984 > > + return url.string().contains("teams.microsoft.com") && url.query().toString().contains("Retried+3+times+without+success"); > > Could we check the host instead of the whole url? I'd rather not match > https://example.com/teams.microsoft.com?Retried+3+times+without+success > It is a combination of the host being teams.microsoft.com and the query containing the "Retried+3+times+without+success" message that means the login has failed because no storage access. If the user has previously granted storage access or has not logged in yet then we do not want to redirect, so we cannot redirect based on the host alone. > > Source/WebCore/page/Quirks.cpp:987 > > +URL Quirks::microsoftTeamsRedirectURL() > > I'm not sure this URL should be in Quirks. Do you think in DocumentLoader::responseReceived instead? (In reply to katherine_cheney from comment #5) > It is a combination of the host being teams.microsoft.com and the query > containing the "Retried+3+times+without+success" message that means the > login has failed because no storage access. If the user has previously > granted storage access or has not logged in yet then we do not want to > redirect, so we cannot redirect based on the host alone. Right, but I think you want to replace url.string()...&&... with url.host()...&&... > Do you think in DocumentLoader::responseReceived instead? Yes, or wherever it ends up being used. (In reply to Alex Christensen from comment #6) > (In reply to katherine_cheney from comment #5) > > It is a combination of the host being teams.microsoft.com and the query > > containing the "Retried+3+times+without+success" message that means the > > login has failed because no storage access. If the user has previously > > granted storage access or has not logged in yet then we do not want to > > redirect, so we cannot redirect based on the host alone. > Right, but I think you want to replace url.string()...&&... with > url.host()...&&... Oh! I see. Yes I will do that. > > Do you think in DocumentLoader::responseReceived instead? > Yes, or wherever it ends up being used. Ok, will fix. Thanks for looking! Created attachment 415358 [details]
Patch
Comment on attachment 415358 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=415358&action=review > Source/WebCore/loader/DocumentLoader.cpp:769 > +static URL microsoftTeamsRedirectURL() This should be inside #if ENABLE(RESOURCE_LOAD_STATISTICS) or just inline where it's used. Created attachment 415362 [details]
Patch
Committed r270421: <https://trac.webkit.org/changeset/270421> All reviewed patches have been landed. Closing bug and clearing flags on attachment 415362 [details]. |