RESOLVED FIXED208035
WKWebViewConfiguration._corsDisablingPatterns should also disable CORS for script tags with crossorigin attributes
https://bugs.webkit.org/show_bug.cgi?id=208035
Summary WKWebViewConfiguration._corsDisablingPatterns should also disable CORS for sc...
Alex Christensen
Reported 2020-02-20 15:32:12 PST
WKWebViewConfiguration._corsDisablingPatterns should also disable CORS for script tags with crossorigin attributes
Attachments
Patch (5.23 KB, patch)
2020-02-20 15:33 PST, Alex Christensen
timothy: review+
Alex Christensen
Comment 1 2020-02-20 15:33:48 PST
Alex Christensen
Comment 2 2020-02-20 15:33:51 PST
youenn fablet
Comment 3 2020-02-21 02:40:18 PST
Comment on attachment 391344 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=391344&action=review > Source/WebCore/loader/CrossOriginAccessControl.cpp:131 > + if (options.mode != FetchOptions::Mode::NoCors) { If the goal is to change the behaviour for scripts only (as seems to indicate the bug title), I believe we should do the change in CachedScriptFetcher. If we want to do this for all loads, maybe we should update the option in CachedResourceLoader instead. Note also that this change is visible from service workers.
Alex Christensen
Comment 4 2020-02-21 07:29:22 PST
We do want it for everything, the title just reflects that we found this through scripts. We should change the title, and maybe move this logic to CachedResourceLoader
Alex Christensen
Comment 5 2020-02-24 10:12:41 PST
I changed the title. http://trac.webkit.org/r257215 Attempts to move this to CachedResourceLoader failed. The only relevant code in that class that is hit in this test is CachedResourceLoader::requestResource and changing the CORS mode then seems too late because it just times out.
Alex Christensen
Comment 6 2020-02-26 17:42:47 PST
Note You need to log in before you can comment on or make changes to this bug.