Bug 185023

Summary: Make cross origin redirection error messages consistent between SubresourceLoader and NetworkLoadChecker
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebKit Misc.Assignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, cdumez, commit-queue, dbates, ews-watchlist, mkwst, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
ews-watchlist: commit-queue-
Archive of layout-test-results from ews105 for mac-sierra-wk2
none
Patch none

youenn fablet
Reported 2018-04-25 21:40:56 PDT
Mak cross origin redirection error messages consistent between SubresourceLoader and NetworkLoadChecker
Attachments
Patch (14.43 KB, patch)
2018-04-25 21:46 PDT, youenn fablet
ews-watchlist: commit-queue-
Archive of layout-test-results from ews105 for mac-sierra-wk2 (2.95 MB, application/zip)
2018-04-25 22:57 PDT, EWS Watchlist
no flags
Patch (17.76 KB, patch)
2018-04-26 08:40 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2018-04-25 21:46:22 PDT
EWS Watchlist
Comment 2 2018-04-25 22:57:02 PDT
Comment on attachment 338854 [details] Patch Attachment 338854 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/7464630 New failing tests: http/tests/xmlhttprequest/redirect-cross-origin-post-sync.html http/tests/xmlhttprequest/redirect-cross-origin-sync.html http/tests/xmlhttprequest/access-control-and-redirects.html http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect.html
EWS Watchlist
Comment 3 2018-04-25 22:57:03 PDT
Created attachment 338859 [details] Archive of layout-test-results from ews105 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
youenn fablet
Comment 4 2018-04-26 08:40:20 PDT
Chris Dumez
Comment 5 2018-04-26 10:11:06 PDT
Comment on attachment 338872 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=338872&action=review > LayoutTests/http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-expected.txt:-1 > -CONSOLE MESSAGE: Cross-origin redirection to http://localhost:8000/security/contentSecurityPolicy/resources/alert-pass.js denied by Cross-Origin Resource Sharing policy: Origin http://127.0.0.1:8000 is not allowed by Access-Control-Allow-Origin. Seems like we're losing useful information here? We no longer know that the issue is related to a redirect?
youenn fablet
Comment 6 2018-04-26 10:21:58 PDT
Comment on attachment 338872 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=338872&action=review >> LayoutTests/http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-expected.txt:-1 >> -CONSOLE MESSAGE: Cross-origin redirection to http://localhost:8000/security/contentSecurityPolicy/resources/alert-pass.js denied by Cross-Origin Resource Sharing policy: Origin http://127.0.0.1:8000 is not allowed by Access-Control-Allow-Origin. > > Seems like we're losing useful information here? We no longer know that the issue is related to a redirect? This is consistent with WebKit1. "Cross-origin redirection to XXX" is happening when we we get a redirect response that fails COR checks. The message tells that we decide to not follow the redirection. "Origin XX is not allowed" is happening in the case where we do get a non-redirection response and CORS checks fail. We could try to come up with a third kind of message for the case of "we followed redirections and the final non-redirect response failed CORS checks". But we would need to change both SubresourceLoader and NetworkLoadChecker.
WebKit Commit Bot
Comment 7 2018-04-26 11:17:01 PDT
Comment on attachment 338872 [details] Patch Clearing flags on attachment: 338872 Committed r231055: <https://trac.webkit.org/changeset/231055>
WebKit Commit Bot
Comment 8 2018-04-26 11:17:02 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9 2018-04-26 11:18:31 PDT
Note You need to log in before you can comment on or make changes to this bug.