Changeset 281012 in webkit
- Timestamp:
- Aug 13, 2021, 3:22:38 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 62 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/http/tests/contentextensions/block-ping-resource-type-raw-expected.txt (modified) (1 diff)
-
LayoutTests/http/tests/contentextensions/fetch-redirect-blocked.html (modified) (1 diff)
-
LayoutTests/http/tests/security/contentSecurityPolicy/worker-blob-inherits-csp-importScripts-redirect-cross-origin-blocked-expected.txt (modified) (1 diff)
-
LayoutTests/http/tests/security/contentSecurityPolicy/worker-csp-importScripts-redirect-cross-origin-blocked-expected.txt (modified) (1 diff)
-
LayoutTests/http/tests/subresource-integrity/sri-module-expected.txt (modified) (1 diff)
-
LayoutTests/http/tests/workers/resources/worker-importScripts.js (modified) (1 diff)
-
LayoutTests/http/tests/workers/service/shift-reload-navigation-expected.txt (modified) (1 diff)
-
LayoutTests/http/tests/workers/worker-importScripts-expected.txt (modified) (1 diff)
-
LayoutTests/http/wpt/service-workers/cors-preflight-star.any-serviceworker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/clipboard-apis/async-navigator-clipboard-basics.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/content-security-policy/inside-worker/dedicatedworker-report-only-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/content-security-policy/inside-worker/serviceworker-report-only.https.sub-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/cc-request.any-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/cc-request.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/coep-on-response-from-service-worker.https-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/none-sw-from-none.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/none-sw-from-require-corp.https-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/require-corp-sw-from-none.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/require-corp-sw-from-require-corp.https-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/credentials.sub-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/credentials.sub-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/credentials.sub-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-credentials-setTimeout.sub-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-credentials.sub-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-referrer-policy.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/import-scripts-cross-origin.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/redirected-response.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/grow-reftypes.tentative.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/js/dom/modules/module-fetch-failure-not-cached-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/http/tests/security/contentSecurityPolicy/worker-blob-inherits-csp-importScripts-redirect-cross-origin-blocked-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/http/tests/security/contentSecurityPolicy/worker-csp-importScripts-redirect-cross-origin-blocked-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/clipboard-apis/async-navigator-clipboard-basics.https-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/content-security-policy/inside-worker/dedicatedworker-report-only-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached.any-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/cc-request.any-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/cc-request.any.worker-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/fetch/FetchBodyOwner.cpp (modified) (1 diff)
-
Source/WebCore/Modules/fetch/FetchResponse.cpp (modified) (1 diff)
-
Source/WebCore/bindings/js/ScriptModuleLoader.cpp (modified) (1 diff)
-
Source/WebCore/platform/network/ResourceErrorBase.h (modified) (5 diffs)
-
Source/WebCore/platform/network/cf/ResourceError.h (modified) (1 diff)
-
Source/WebCore/platform/network/curl/ResourceError.h (modified) (1 diff)
-
Source/WebCore/platform/network/soup/ResourceError.h (modified) (1 diff)
-
Source/WebCore/workers/WorkerScriptLoader.cpp (modified) (1 diff)
-
Source/WebCore/workers/service/FetchEvent.cpp (modified) (4 diffs)
-
Source/WebCore/workers/service/FetchEvent.h (modified) (1 diff)
-
Source/WebCore/workers/service/context/ServiceWorkerFetch.cpp (modified) (3 diffs)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/Shared/WebCoreArgumentCoders.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r281010 r281012 1 2021-08-13 Youenn Fablet <youenn@apple.com> 2 3 Overly verbose catchable fetch error messages lead to cross-origin leaks 4 https://bugs.webkit.org/show_bug.cgi?id=228861 5 6 Reviewed by Brent Fulgham. 7 8 * http/tests/contentextensions/block-ping-resource-type-raw-expected.txt: 9 * http/tests/contentextensions/fetch-redirect-blocked.html: 10 * http/tests/security/contentSecurityPolicy/worker-blob-inherits-csp-importScripts-redirect-cross-origin-blocked-expected.txt: 11 * http/tests/security/contentSecurityPolicy/worker-csp-importScripts-redirect-cross-origin-blocked-expected.txt: 12 * http/tests/subresource-integrity/sri-module-expected.txt: 13 * http/tests/workers/service/shift-reload-navigation-expected.txt: 14 * http/tests/workers/resources/worker-importScripts.js: changed error logging for better readability. 15 * http/tests/workers/worker-importScripts-expected.txt: 16 * http/wpt/service-workers/cors-preflight-star.any-serviceworker-expected.txt: 17 * js/dom/modules/module-fetch-failure-not-cached-expected.txt: 18 * platform/mac-wk1/http/tests/security/contentSecurityPolicy/worker-blob-inherits-csp-importScripts-redirect-cross-origin-blocked-expected.txt: 19 * platform/mac-wk1/http/tests/security/contentSecurityPolicy/worker-csp-importScripts-redirect-cross-origin-blocked-expected.txt: 20 * platform/mac-wk1/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any-expected.txt: 21 * platform/mac-wk1/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any.worker-expected.txt: 22 * platform/mac-wk1/imported/w3c/web-platform-tests/clipboard-apis/async-navigator-clipboard-basics.https-expected.txt: 23 * platform/mac-wk1/imported/w3c/web-platform-tests/content-security-policy/inside-worker/dedicatedworker-report-only-expected.txt: 24 * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached.any-expected.txt: 25 * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached.any.worker-expected.txt: 26 * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/cc-request.any-expected.txt: 27 * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/cc-request.any.worker-expected.txt: 28 1 29 2021-08-13 Martin Robinson <mrobinson@webkit.org> 2 30 -
trunk/LayoutTests/http/tests/contentextensions/block-ping-resource-type-raw-expected.txt
r275204 r281012 3 3 CONSOLE MESSAGE: Resource blocked by content blocker 4 4 CONSOLE MESSAGE: Fetch API cannot load http://127.0.0.1:8000/contentextensions/resources/save-ping.py?test=contentextensions-block-ping-resource-type-raw due to access control checks. 5 ALERT: PASS:TypeError: Resource blocked by content blocker5 ALERT: PASS:TypeError: Load failed 6 6 This test follows a link with a ping attribute where the ping URL matches a 'block' rule. 7 7 -
trunk/LayoutTests/http/tests/contentextensions/fetch-redirect-blocked.html
r275204 r281012 8 8 assert_not_reached("fetch should fail"); 9 9 }, (e) => { 10 assert_equals(e.message, " Blocked by Content Security Policy.");10 assert_equals(e.message, "Load failed"); 11 11 }); 12 12 }, "Ensure CSP happens before content blocker checks"); -
trunk/LayoutTests/http/tests/security/contentSecurityPolicy/worker-blob-inherits-csp-importScripts-redirect-cross-origin-blocked-expected.txt
r232032 r281012 3 3 This tests that the Content Security Policy of the parent origin (this page) blocks a Web Worker from importing a script from a different origin, not listed in script-src, through a redirect. 4 4 5 PASS threw exception NetworkError: Blocked by Content Security Policy..5 PASS threw exception NetworkError: Load failed. -
trunk/LayoutTests/http/tests/security/contentSecurityPolicy/worker-csp-importScripts-redirect-cross-origin-blocked-expected.txt
r232032 r281012 3 3 This tests a Web Worker with Content Security Policy "script-src 'self'" blocks the import of a script from a different origin through a redirect. 4 4 5 PASS threw exception NetworkError: Blocked by Content Security Policy..5 PASS threw exception NetworkError: Load failed. -
trunk/LayoutTests/http/tests/subresource-integrity/sri-module-expected.txt
r273203 r281012 1 CONSOLE MESSAGE: TypeError: Cannot load script http://127.0.0.1:8000/subresource-integrity/resources/non-matching-digest-module.js. Failed integrity metadata check. Content length: 33, Expected content length: 33, Expected metadata: sha256-cWh9nPfm7/mRbKhzarnRYlsJWz5XTNcsqPFzKEx+zSU=2 CONSOLE MESSAGE: TypeError: Cannot load script http://127.0.0.1:8000/subresource-integrity/resources/matching-digest-module.js. Failed integrity metadata check. Content length: 29, Expected content length: 29, Expected metadata: sha512-deadbeefspbnUnwooKGNNCb39nvg+EW0O9hDScTXeo/9pVZztLSUYU3LNV6H0lZapo8bCJUpyPPLAzE9fDzpxg== sha256-cWh9nPfm7/mRbKhzarnRYlsJWz5XTNcsqPFzKEx+zSU=3 CONSOLE MESSAGE: TypeError: Cannot load script http://localhost:8000/subresource-integrity/resources/crossorigin-anon-script-module.js. Failed integrity metadata check. Content length: 37, Expected content length: 37, Expected metadata: sha256-deadbeefcSLlbFZCj1OACLxTxVck2TOrBTEdUbwz1yU=4 CONSOLE MESSAGE: TypeError: Cannot load script http://localhost:8000/subresource-integrity/resources/crossorigin-creds-script-module.js. Failed integrity metadata check. Content length: 38, Expected content length: 38, Expected metadata: sha256-deadbeef2S+pTRZgiw3DWrhC6JLDlt2zRyGpwH7unU8=1 CONSOLE MESSAGE: TypeError: Cannot load script due to integrity mismatch 2 CONSOLE MESSAGE: TypeError: Cannot load script due to integrity mismatch 3 CONSOLE MESSAGE: TypeError: Cannot load script due to integrity mismatch 4 CONSOLE MESSAGE: TypeError: Cannot load script due to integrity mismatch 5 5 CONSOLE MESSAGE: Origin http://127.0.0.1:8000 is not allowed by Access-Control-Allow-Origin. 6 CONSOLE MESSAGE: TypeError: Cannot load script http://127.0.0.1:8000/subresource-integrity/resources/matching-digest-module.js. Failed integrity metadata check. Content length: 29, Expected content length: 29, Expected metadata: sha256-cWh9nPfm7_mRbKhzarnRYlsJWz5XTNcsqPFzKEx+zSU=7 CONSOLE MESSAGE: TypeError: Cannot load script http://127.0.0.1:8000/subresource-integrity/resources/matching-digest-module.js. Failed integrity metadata check. Content length: 29, Expected content length: 29, Expected metadata: sha256-U9WYDtBWkcHx13+9UKk/3Q5eoqDc4YGxYb07EPWzb9e=?foo=bar?spam=eggs6 CONSOLE MESSAGE: TypeError: Cannot load script due to integrity mismatch 7 CONSOLE MESSAGE: TypeError: Cannot load script due to integrity mismatch 8 8 9 9 PASS Module: Same-origin with correct sha256 hash. -
trunk/LayoutTests/http/tests/workers/resources/worker-importScripts.js
r272981 r281012 101 101 importScripts(source1, fakeSource, source2); 102 102 } catch(e) { 103 postMessage("PASS: Threw " + e + " when load failed");103 postMessage("PASS: Threw " + e + " when importing script"); 104 104 } 105 105 if (!loadedSource1 && !loadedSource2) -
trunk/LayoutTests/http/tests/workers/service/shift-reload-navigation-expected.txt
r231000 r281012 3 3 CONSOLE MESSAGE: Origin http://127.0.0.1:8000 is not allowed by Access-Control-Allow-Origin. 4 4 CONSOLE MESSAGE: Fetch API cannot load http://localhost:8080/resources/square100.png.fromserviceworker due to access control checks. 5 PASS: Fetch failed as expected with: TypeError: Origin http://127.0.0.1:8000 is not allowed by Access-Control-Allow-Origin.5 PASS: Fetch failed as expected with: TypeError: Load failed 6 6 PASS: Got response with buffer byte length being 12940 7 PASS: Fetch failed as expected with: TypeError: Origin http://127.0.0.1:8000 is not allowed by Access-Control-Allow-Origin.7 PASS: Fetch failed as expected with: TypeError: Load failed 8 8 -
trunk/LayoutTests/http/tests/workers/worker-importScripts-expected.txt
r253102 r281012 25 25 PASS: all resources executed. 26 26 Loaded resource 1 27 PASS: Threw NetworkError: Response is not 2xx when load failed27 PASS: Threw NetworkError: Load failed when importing script 28 28 PASS: some resources were loaded despite the network error 29 29 Loaded resource 1 -
trunk/LayoutTests/http/wpt/service-workers/cors-preflight-star.any-serviceworker-expected.txt
r267644 r281012 1 1 2 2 PASS Setting up tests 3 FAIL CORS that succeeds with credentials: false; method: GET (allowed: get); header: X-Test,1 (allowed: x-test) promise_test: Unhandled rejection with value: object "TypeError: Preflight response is not successful"4 FAIL CORS that succeeds with credentials: false; method: SUPER (allowed: *); header: X-Test,1 (allowed: x-test) promise_test: Unhandled rejection with value: object "TypeError: Preflight response is not successful"5 FAIL CORS that succeeds with credentials: false; method: OK (allowed: *); header: X-Test,1 (allowed: *) promise_test: Unhandled rejection with value: object "TypeError: Preflight response is not successful"3 FAIL CORS that succeeds with credentials: false; method: GET (allowed: get); header: X-Test,1 (allowed: x-test) promise_test: Unhandled rejection with value: object "TypeError: Load failed" 4 FAIL CORS that succeeds with credentials: false; method: SUPER (allowed: *); header: X-Test,1 (allowed: x-test) promise_test: Unhandled rejection with value: object "TypeError: Load failed" 5 FAIL CORS that succeeds with credentials: false; method: OK (allowed: *); header: X-Test,1 (allowed: *) promise_test: Unhandled rejection with value: object "TypeError: Load failed" 6 6 PASS CORS that fails with credentials: true; method: OK (allowed: *); header: X-Test,1 (allowed: *) 7 7 PASS CORS that fails with credentials: true; method: PUT (allowed: *); header: (allowed: ) 8 FAIL CORS that succeeds with credentials: true; method: PUT (allowed: PUT); header: (allowed: *) promise_test: Unhandled rejection with value: object "TypeError: Preflight response is not successful"8 FAIL CORS that succeeds with credentials: true; method: PUT (allowed: PUT); header: (allowed: *) promise_test: Unhandled rejection with value: object "TypeError: Load failed" 9 9 PASS CORS that fails with credentials: true; method: PUT (allowed: put); header: (allowed: *) 10 10 PASS CORS that fails with credentials: true; method: GET (allowed: get); header: X-Test,1 (allowed: *) 11 11 PASS CORS that fails with credentials: true; method: GET (allowed: *); header: X-Test,1 (allowed: *) 12 FAIL CORS that succeeds with credentials: true; method: * (allowed: *); header: *,1 (allowed: *) promise_test: Unhandled rejection with value: object "TypeError: Preflight response is not successful"12 FAIL CORS that succeeds with credentials: true; method: * (allowed: *); header: *,1 (allowed: *) promise_test: Unhandled rejection with value: object "TypeError: Load failed" 13 13 -
trunk/LayoutTests/imported/w3c/ChangeLog
r281009 r281012 1 2021-08-13 Youenn Fablet <youenn@apple.com> 2 3 Overly verbose catchable fetch error messages lead to cross-origin leaks 4 https://bugs.webkit.org/show_bug.cgi?id=228861 5 6 Reviewed by Brent Fulgham. 7 8 Rebasing tests with new error message. 9 10 * web-platform-tests/FileAPI/url/url-with-fetch.any-expected.txt: 11 * web-platform-tests/FileAPI/url/url-with-fetch.any.worker-expected.txt: 12 * web-platform-tests/clipboard-apis/async-navigator-clipboard-basics.https-expected.txt: 13 * web-platform-tests/content-security-policy/inside-worker/dedicatedworker-report-only-expected.txt: 14 * web-platform-tests/content-security-policy/inside-worker/serviceworker-report-only.https.sub-expected.txt: 15 * web-platform-tests/fetch/api/cors/cors-cookies.any.worker-expected.txt: 16 * web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https-expected.txt: 17 * web-platform-tests/fetch/http-cache/cc-request.any-expected.txt: 18 * web-platform-tests/fetch/http-cache/cc-request.any.worker-expected.txt: 19 * web-platform-tests/html/cross-origin-embedder-policy/coep-on-response-from-service-worker.https-expected.txt: 20 * web-platform-tests/html/cross-origin-embedder-policy/none-sw-from-none.https-expected.txt: 21 * web-platform-tests/html/cross-origin-embedder-policy/none-sw-from-require-corp.https-expected.txt: 22 * web-platform-tests/html/cross-origin-embedder-policy/require-corp-sw-from-none.https-expected.txt: 23 * web-platform-tests/html/cross-origin-embedder-policy/require-corp-sw-from-require-corp.https-expected.txt: 24 * web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/credentials.sub-expected.txt: 25 * web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/credentials.sub-expected.txt: 26 * web-platform-tests/html/semantics/scripting-1/the-script-element/module/credentials.sub-expected.txt: 27 * web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-credentials-setTimeout.sub-expected.txt: 28 * web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-credentials.sub-expected.txt: 29 * web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-expected.txt: 30 * web-platform-tests/service-workers/service-worker/fetch-event-referrer-policy.https-expected.txt: 31 * web-platform-tests/service-workers/service-worker/import-scripts-cross-origin.https-expected.txt: 32 * web-platform-tests/service-workers/service-worker/redirected-response.https-expected.txt: 33 * web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.worker-expected.txt: 34 * web-platform-tests/wasm/jsapi/table/grow-reftypes.tentative.any.worker-expected.txt: 35 * web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.worker-expected.txt: 36 1 37 2021-08-12 Alex Christensen <achristensen@webkit.org> 2 38 -
trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any-expected.txt
r270269 r281012 13 13 PASS fetch with method "CUSTOM" should fail 14 14 PASS fetch should return Content-Type from Blob 15 FAIL Revoke blob URL after creating Request, will fetch promise_test: Unhandled rejection with value: object "TypeError: The operation couldn’t be completed. (WebKitBlobResource error 1.)"15 FAIL Revoke blob URL after creating Request, will fetch promise_test: Unhandled rejection with value: object "TypeError: Load failed" 16 16 PASS Revoke blob URL after calling fetch, fetch should succeed 17 17 -
trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any.worker-expected.txt
r270269 r281012 13 13 PASS fetch with method "CUSTOM" should fail 14 14 PASS fetch should return Content-Type from Blob 15 FAIL Revoke blob URL after creating Request, will fetch promise_test: Unhandled rejection with value: object "TypeError: The operation couldn’t be completed. (WebKitBlobResource error 1.)"15 FAIL Revoke blob URL after creating Request, will fetch promise_test: Unhandled rejection with value: object "TypeError: Load failed" 16 16 PASS Revoke blob URL after calling fetch, fetch should succeed 17 17 -
trunk/LayoutTests/imported/w3c/web-platform-tests/clipboard-apis/async-navigator-clipboard-basics.https-expected.txt
r267651 r281012 12 12 PASS navigator.clipboard.writeText(DOMString) succeeds 13 13 PASS navigator.clipboard.writeText() fails (expect DOMString) 14 FAIL navigator.clipboard.write({string : image/png Blob}) succeeds promise_test: Unhandled rejection with value: object "TypeError: Not allowed to request resource"14 FAIL navigator.clipboard.write({string : image/png Blob}) succeeds promise_test: Unhandled rejection with value: object "TypeError: Load failed" 15 15 PASS navigator.clipboard.read() succeeds 16 16 PASS navigator.clipboard.readText() succeeds -
trunk/LayoutTests/imported/w3c/web-platform-tests/content-security-policy/inside-worker/dedicatedworker-report-only-expected.txt
r279838 r281012 5 5 PASS Same-origin 'fetch()'. 6 6 PASS Same-origin XHR. 7 FAIL Cross-origin 'fetch()'. promise_test: Unhandled rejection with value: object "TypeError: Type error"7 FAIL Cross-origin 'fetch()'. promise_test: Unhandled rejection with value: object "TypeError: Load failed" 8 8 FAIL Cross-origin XHR. promise_test: Unhandled rejection with value: "xhr.open should not have thrown." 9 FAIL Same-origin => cross-origin 'fetch()'. promise_test: Unhandled rejection with value: object "TypeError: cancelled"9 FAIL Same-origin => cross-origin 'fetch()'. promise_test: Unhandled rejection with value: object "TypeError: Load failed" 10 10 FAIL connect-src-self-report-only assert_array_equals: Reports do not match lengths differ, expected array ["http://localhost:8800/common/redirect-opt-in.py?status=307&location=https://www.localhost:9444/content-security-policy/support/resource.py?cross-origin-fetch", "https://www.localhost:9444/content-security-policy/support/resource.py?cross-origin-fetch", "https://www.localhost:9444/content-security-policy/support/resource.py?cross-origin-xhr"] length 3, got [] length 0 11 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/content-security-policy/inside-worker/serviceworker-report-only.https.sub-expected.txt
r279838 r281012 2 2 PASS serviceworker-report-only 3 3 PASS Same-origin 'fetch()'. 4 FAIL Cross-origin 'fetch()'. promise_test: Unhandled rejection with value: object "TypeError: A server with the specified hostname could not be found."5 FAIL Same-origin => cross-origin 'fetch()'. promise_test: Unhandled rejection with value: object "TypeError: A server with the specified hostname could not be found."4 FAIL Cross-origin 'fetch()'. promise_test: Unhandled rejection with value: object "TypeError: Load failed" 5 FAIL Same-origin => cross-origin 'fetch()'. promise_test: Unhandled rejection with value: object "TypeError: Load failed" 6 6 FAIL connect-src-self-report-only assert_array_equals: Reports do not match lengths differ, expected array ["https://localhost:9443/common/redirect-opt-in.py?status=307&location=https://www.localhost:9444/content-security-policy/support/resource.py?cross-origin-fetch", "https://www.localhost:9444/content-security-policy/support/resource.py?cross-origin-fetch"] length 2, got [] length 0 7 7 -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies.any.worker-expected.txt
r267651 r281012 6 6 PASS Include mode: remote cookies are not sent with local request 7 7 PASS Same-origin mode: cookies are discarded in cors request 8 FAIL Include mode: remote cookies are not sent with other remote request promise_test: Unhandled rejection with value: object "TypeError: Type error"8 FAIL Include mode: remote cookies are not sent with other remote request promise_test: Unhandled rejection with value: object "TypeError: Load failed" 9 9 -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https-expected.txt
r267651 r281012 1 1 2 2 PASS Fetch in service worker: referrer with origin-when-cross-origin policy 3 FAIL Request's referrer is origin promise_test: Unhandled rejection with value: object "TypeError: Not allowed to request resource"3 FAIL Request's referrer is origin promise_test: Unhandled rejection with value: object "TypeError: Load failed" 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/cc-request.any-expected.txt
r279344 r281012 11 11 PASS HTTP cache validates fresh response with ETag when request contains Cache-Control: no-cache 12 12 FAIL HTTP cache doesn't reuse fresh response when request contains Cache-Control: no-store assert_equals: Response 2 comes from cache expected 2 but got 1 13 FAIL HTTP cache generates 504 status code when nothing is in cache and request contains Cache-Control: only-if-cached promise_test: Unhandled rejection with value: object "TypeError: can’t load from network"13 FAIL HTTP cache generates 504 status code when nothing is in cache and request contains Cache-Control: only-if-cached promise_test: Unhandled rejection with value: object "TypeError: Load failed" 14 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/cc-request.any.worker-expected.txt
r279344 r281012 11 11 PASS HTTP cache validates fresh response with ETag when request contains Cache-Control: no-cache 12 12 FAIL HTTP cache doesn't reuse fresh response when request contains Cache-Control: no-store assert_equals: Response 2 comes from cache expected 2 but got 1 13 FAIL HTTP cache generates 504 status code when nothing is in cache and request contains Cache-Control: only-if-cached promise_test: Unhandled rejection with value: object "TypeError: can’t load from network"13 FAIL HTTP cache generates 504 status code when nothing is in cache and request contains Cache-Control: only-if-cached promise_test: Unhandled rejection with value: object "TypeError: Load failed" 14 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/coep-on-response-from-service-worker.https-expected.txt
r280953 r281012 1 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Cancelled load to https://127.0.0.1:9443/html/cross-origin-embedder-policy/resources/nothing-same-origin-corp.txt because it violates the resource's Cross-Origin-Resource-Policy response header.1 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Load failed 2 2 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/html/cross-origin-embedder-policy/resources/nothing-same-origin-corp.txt. 3 3 CONSOLE MESSAGE: Cancelled load to https://127.0.0.1:9443/common/blank.html because it violates the resource's Cross-Origin-Resource-Policy response header. … … 7 7 CONSOLE MESSAGE: Cancelled load to https://127.0.0.1:9443/common/blank.html?passthrough because it violates the resource's Cross-Origin-Resource-Policy response header. 8 8 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/common/blank.html?passthrough due to access control checks. 9 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Origin https://localhost:9443 is not allowed by Access-Control-Allow-Origin.9 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Load failed 10 10 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/common/blank.html. 11 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/none-sw-from-none.https-expected.txt
r279427 r281012 1 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Cancelled load to https://127.0.0.1:9443/html/cross-origin-embedder-policy/resources/nothing-same-origin-corp.txt because it violates the resource's Cross-Origin-Resource-Policy response header.1 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Load failed 2 2 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/html/cross-origin-embedder-policy/resources/nothing-same-origin-corp.txt. 3 3 CONSOLE MESSAGE: Cancelled load to https://127.0.0.1:9443/html/cross-origin-embedder-policy/resources/nothing-same-origin-corp.txt?passthrough because it violates the resource's Cross-Origin-Resource-Policy response header. 4 4 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/html/cross-origin-embedder-policy/resources/nothing-same-origin-corp.txt?passthrough due to access control checks. 5 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Origin https://localhost:9443 is not allowed by Access-Control-Allow-Origin.5 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Load failed 6 6 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/common/blank.html. 7 7 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/none-sw-from-require-corp.https-expected.txt
r280953 r281012 1 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Cancelled load to https://127.0.0.1:9443/html/cross-origin-embedder-policy/resources/nothing-same-origin-corp.txt because it violates the resource's Cross-Origin-Resource-Policy response header.1 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Load failed 2 2 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/html/cross-origin-embedder-policy/resources/nothing-same-origin-corp.txt. 3 3 CONSOLE MESSAGE: Cancelled load to https://127.0.0.1:9443/common/blank.html because it violates the resource's Cross-Origin-Resource-Policy response header. … … 7 7 CONSOLE MESSAGE: Cancelled load to https://127.0.0.1:9443/common/blank.html?passthrough because it violates the resource's Cross-Origin-Resource-Policy response header. 8 8 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/common/blank.html?passthrough due to access control checks. 9 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Origin https://localhost:9443 is not allowed by Access-Control-Allow-Origin.9 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Load failed 10 10 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/common/blank.html. 11 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/require-corp-sw-from-none.https-expected.txt
r280953 r281012 1 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Cancelled load to https://127.0.0.1:9443/html/cross-origin-embedder-policy/resources/nothing-same-origin-corp.txt because it violates the resource's Cross-Origin-Resource-Policy response header.1 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Load failed 2 2 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/html/cross-origin-embedder-policy/resources/nothing-same-origin-corp.txt. 3 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Cancelled load to https://127.0.0.1:9443/common/blank.html because it violates the resource's Cross-Origin-Resource-Policy response header.3 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Load failed 4 4 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/common/blank.html. 5 5 CONSOLE MESSAGE: Cancelled load to https://127.0.0.1:9443/html/cross-origin-embedder-policy/resources/nothing-same-origin-corp.txt?passthrough because it violates the resource's Cross-Origin-Resource-Policy response header. 6 6 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/html/cross-origin-embedder-policy/resources/nothing-same-origin-corp.txt?passthrough due to access control checks. 7 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Origin https://localhost:9443 is not allowed by Access-Control-Allow-Origin.7 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Load failed 8 8 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/common/blank.html. 9 9 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/require-corp-sw-from-require-corp.https-expected.txt
r280953 r281012 1 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Cancelled load to https://127.0.0.1:9443/html/cross-origin-embedder-policy/resources/nothing-same-origin-corp.txt because it violates the resource's Cross-Origin-Resource-Policy response header.1 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Load failed 2 2 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/html/cross-origin-embedder-policy/resources/nothing-same-origin-corp.txt. 3 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Cancelled load to https://127.0.0.1:9443/common/blank.html because it violates the resource's Cross-Origin-Resource-Policy response header.3 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Load failed 4 4 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/common/blank.html. 5 5 CONSOLE MESSAGE: Cancelled load to https://127.0.0.1:9443/html/cross-origin-embedder-policy/resources/nothing-same-origin-corp.txt?passthrough because it violates the resource's Cross-Origin-Resource-Policy response header. … … 7 7 CONSOLE MESSAGE: Cancelled load to https://127.0.0.1:9443/common/blank.html?passthrough because it violates the resource's Cross-Origin-Resource-Policy response header. 8 8 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/common/blank.html?passthrough due to access control checks. 9 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Origin https://localhost:9443 is not allowed by Access-Control-Allow-Origin.9 CONSOLE MESSAGE: FetchEvent.respondWith received an error: TypeError: Load failed 10 10 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/common/blank.html. 11 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/credentials.sub-expected.txt
r279427 r281012 2 2 CONSOLE MESSAGE: Fetch API cannot load http://www2.localhost:8800/cookies/resources/set-cookie.py?name=milk&path=/html/semantics/scripting-1/the-script-element/css-module/ due to access control checks. 3 3 4 FAIL CSS Modules should be loaded with or without the credentials based on the same-origin-ness and the crossOrigin attribute promise_test: Unhandled rejection with value: object "TypeError: Type error"4 FAIL CSS Modules should be loaded with or without the credentials based on the same-origin-ness and the crossOrigin attribute promise_test: Unhandled rejection with value: object "TypeError: Load failed" 5 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/credentials.sub-expected.txt
r279427 r281012 2 2 CONSOLE MESSAGE: Fetch API cannot load http://www2.localhost:8800/cookies/resources/set-cookie.py?name=milk&path=/html/semantics/scripting-1/the-script-element/json-module/ due to access control checks. 3 3 4 FAIL JSON Modules should be loaded with or without the credentials based on the same-origin-ness and the crossOrigin attribute promise_test: Unhandled rejection with value: object "TypeError: Type error"4 FAIL JSON Modules should be loaded with or without the credentials based on the same-origin-ness and the crossOrigin attribute promise_test: Unhandled rejection with value: object "TypeError: Load failed" 5 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/credentials.sub-expected.txt
r259900 r281012 2 2 CONSOLE MESSAGE: Fetch API cannot load http://www2.localhost:8800/cookies/resources/set-cookie.py?name=cross&path=/html/semantics/scripting-1/the-script-element/module/ due to access control checks. 3 3 4 FAIL Modules should be loaded with or without the credentials based on the same-origin-ness and the crossOrigin attribute promise_test: Unhandled rejection with value: object "TypeError: Type error"4 FAIL Modules should be loaded with or without the credentials based on the same-origin-ness and the crossOrigin attribute promise_test: Unhandled rejection with value: object "TypeError: Load failed" 5 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-credentials-setTimeout.sub-expected.txt
r269598 r281012 1 1 Blocked access to external URL http://www2.localhost:8800/cookies/resources/set-cookie.py?name=cross&path=/html/semantics/scripting-1/the-script-element/module/ 2 2 CONSOLE MESSAGE: Fetch API cannot load http://www2.localhost:8800/cookies/resources/set-cookie.py?name=cross&path=/html/semantics/scripting-1/the-script-element/module/ due to access control checks. 3 CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: Type error3 CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: Load failed 4 4 5 Harness Error (FAIL), message = Unhandled rejection: Type error5 Harness Error (FAIL), message = Unhandled rejection: Load failed 6 6 7 7 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-credentials.sub-expected.txt
r269598 r281012 1 1 Blocked access to external URL http://www2.localhost:8800/cookies/resources/set-cookie.py?name=cross&path=/html/semantics/scripting-1/the-script-element/module/ 2 2 CONSOLE MESSAGE: Fetch API cannot load http://www2.localhost:8800/cookies/resources/set-cookie.py?name=cross&path=/html/semantics/scripting-1/the-script-element/module/ due to access control checks. 3 CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: Type error3 CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: Load failed 4 4 5 Harness Error (FAIL), message = Unhandled rejection: Type error5 Harness Error (FAIL), message = Unhandled rejection: Load failed 6 6 7 7 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-expected.txt
r267646 r281012 1 CONSOLE MESSAGE: TypeError: Cannot load script http://localhost:8800/html/semantics/scripting-1/the-script-element/module/integrity-mismatches.js. Failed integrity metadata check. Content length: 93, Expected content length: -1, Expected metadata: sha384-doesnotmatch1 CONSOLE MESSAGE: TypeError: Cannot load script due to integrity mismatch 2 2 3 3 PASS The integrity attribute must have no affect on inline module scripts -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-referrer-policy.https-expected.txt
r280081 r281012 1 1 2 2 3 FAIL Service Worker responds to fetch event with the referrer policy promise_test: Unhandled rejection with value: object "TypeError: Not allowed to request resource"3 FAIL Service Worker responds to fetch event with the referrer policy promise_test: Unhandled rejection with value: object "TypeError: Load failed" 4 4 PASS Service Worker should respond to fetch with the default referrer policy 5 5 PASS Service Worker should respond to fetch with the referrer URL when a member of RequestInit is present - Default Referrer -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/import-scripts-cross-origin.https-expected.txt
r279389 r281012 1 1 2 FAIL importScripts() supports cross-origin requests promise_test: Unhandled rejection with value: object "TypeError: NetworkError: A server with the specified hostname could not be found."2 FAIL importScripts() supports cross-origin requests promise_test: Unhandled rejection with value: object "TypeError: NetworkError: Load failed" 3 3 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/redirected-response.https-expected.txt
r279389 r281012 20 20 PASS mode: "follow", generated relative redirect response 21 21 PASS mode: "error", generated relative redirect response 22 FAIL mode: "manual", generated relative redirect response promise_test: Unhandled rejection with value: object "TypeError: The URL can’t be shown"22 FAIL mode: "manual", generated relative redirect response promise_test: Unhandled rejection with value: object "TypeError: Load failed" 23 23 PASS Fetch should follow the redirect response 20 times 24 24 PASS Fetch should not follow the redirect response 21 times. -
trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.worker-expected.txt
r271774 r281012 1 CONSOLE MESSAGE: NetworkError: Response is not 2xx1 CONSOLE MESSAGE: NetworkError: Load failed 2 2 3 Harness Error (FAIL), message = NetworkError: Response is not 2xx3 Harness Error (FAIL), message = NetworkError: Load failed 4 4 5 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/grow-reftypes.tentative.any.worker-expected.txt
r260690 r281012 1 CONSOLE MESSAGE: NetworkError: Response is not 2xx1 CONSOLE MESSAGE: NetworkError: Load failed 2 2 3 Harness Error (FAIL), message = NetworkError: Response is not 2xx3 Harness Error (FAIL), message = NetworkError: Load failed 4 4 5 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.worker-expected.txt
r271774 r281012 1 CONSOLE MESSAGE: NetworkError: Response is not 2xx1 CONSOLE MESSAGE: NetworkError: Load failed 2 2 3 Harness Error (FAIL), message = NetworkError: Response is not 2xx3 Harness Error (FAIL), message = NetworkError: Load failed 4 4 5 5 -
trunk/LayoutTests/js/dom/modules/module-fetch-failure-not-cached-expected.txt
r267644 r281012 1 CONSOLE MESSAGE: TypeError: Cannot load script module-fetch-failure-not-cached.js. Failed integrity metadata check. Content length: 30, Expected content length: 30, Expected metadata: sha256-badbeef1 CONSOLE MESSAGE: TypeError: Cannot load script due to integrity mismatch 2 2 3 3 PASS Module fetch failure is not cached in module pipeline -
trunk/LayoutTests/platform/mac-wk1/http/tests/security/contentSecurityPolicy/worker-blob-inherits-csp-importScripts-redirect-cross-origin-blocked-expected.txt
r232032 r281012 1 1 This tests that the Content Security Policy of the parent origin (this page) blocks a Web Worker from importing a script from a different origin, not listed in script-src, through a redirect. 2 2 3 PASS threw exception NetworkError: Blocked by Content Security Policy..3 PASS threw exception NetworkError: Load failed. -
trunk/LayoutTests/platform/mac-wk1/http/tests/security/contentSecurityPolicy/worker-csp-importScripts-redirect-cross-origin-blocked-expected.txt
r232032 r281012 1 1 This tests a Web Worker with Content Security Policy "script-src 'self'" blocks the import of a script from a different origin through a redirect. 2 2 3 PASS threw exception NetworkError: Blocked by Content Security Policy..3 PASS threw exception NetworkError: Load failed. -
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any-expected.txt
r270269 r281012 13 13 PASS fetch with method "CUSTOM" should fail 14 14 PASS fetch should return Content-Type from Blob 15 FAIL Revoke blob URL after creating Request, will fetch promise_test: Unhandled rejection with value: object "TypeError: Type error"15 FAIL Revoke blob URL after creating Request, will fetch promise_test: Unhandled rejection with value: object "TypeError: Load failed" 16 16 PASS Revoke blob URL after calling fetch, fetch should succeed 17 17 -
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any.worker-expected.txt
r270269 r281012 13 13 PASS fetch with method "CUSTOM" should fail 14 14 PASS fetch should return Content-Type from Blob 15 FAIL Revoke blob URL after creating Request, will fetch promise_test: Unhandled rejection with value: object "TypeError: Type error"15 FAIL Revoke blob URL after creating Request, will fetch promise_test: Unhandled rejection with value: object "TypeError: Load failed" 16 16 PASS Revoke blob URL after calling fetch, fetch should succeed 17 17 -
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/clipboard-apis/async-navigator-clipboard-basics.https-expected.txt
r264544 r281012 12 12 FAIL navigator.clipboard.writeText(DOMString) succeeds promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.clipboard.writeText')" 13 13 FAIL navigator.clipboard.writeText() fails (expect DOMString) promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.clipboard.writeText')" 14 FAIL navigator.clipboard.write({string : image/png Blob}) succeeds promise_test: Unhandled rejection with value: object "TypeError: Not allowed to request resource"14 FAIL navigator.clipboard.write({string : image/png Blob}) succeeds promise_test: Unhandled rejection with value: object "TypeError: Load failed" 15 15 FAIL navigator.clipboard.read() succeeds promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.clipboard.read')" 16 16 FAIL navigator.clipboard.readText() succeeds promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'navigator.clipboard.readText')" -
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/content-security-policy/inside-worker/dedicatedworker-report-only-expected.txt
r279838 r281012 5 5 PASS Same-origin 'fetch()'. 6 6 PASS Same-origin XHR. 7 FAIL Cross-origin 'fetch()'. promise_test: Unhandled rejection with value: object "TypeError: Type error"7 FAIL Cross-origin 'fetch()'. promise_test: Unhandled rejection with value: object "TypeError: Load failed" 8 8 FAIL Cross-origin XHR. promise_test: Unhandled rejection with value: "xhr.open should not have thrown." 9 FAIL Same-origin => cross-origin 'fetch()'. promise_test: Unhandled rejection with value: object "TypeError: Type error"9 FAIL Same-origin => cross-origin 'fetch()'. promise_test: Unhandled rejection with value: object "TypeError: Load failed" 10 10 FAIL connect-src-self-report-only assert_array_equals: Reports do not match lengths differ, expected array ["http://localhost:8800/common/redirect-opt-in.py?status=307&location=https://www.localhost:9444/content-security-policy/support/resource.py?cross-origin-fetch", "https://www.localhost:9444/content-security-policy/support/resource.py?cross-origin-fetch", "https://www.localhost:9444/content-security-policy/support/resource.py?cross-origin-xhr"] length 3, got [] length 0 11 11 -
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached.any-expected.txt
r279344 r281012 6 6 PASS RequestCache "only-if-cached" mode checks the cache for previously cached content and does not go to the network if a cached response is not found with Etag and fresh response 7 7 PASS RequestCache "only-if-cached" mode checks the cache for previously cached content and does not go to the network if a cached response is not found with Last-Modified and fresh response 8 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Etag and fresh response promise_test: Unhandled rejection with value: object "TypeError: resource unavailable"9 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Last-Modified and fresh response promise_test: Unhandled rejection with value: object "TypeError: resource unavailable"10 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Etag and stale response promise_test: Unhandled rejection with value: object "TypeError: resource unavailable"11 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Last-Modified and stale response promise_test: Unhandled rejection with value: object "TypeError: resource unavailable"8 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Etag and fresh response promise_test: Unhandled rejection with value: object "TypeError: Load failed" 9 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Last-Modified and fresh response promise_test: Unhandled rejection with value: object "TypeError: Load failed" 10 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Etag and stale response promise_test: Unhandled rejection with value: object "TypeError: Load failed" 11 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Last-Modified and stale response promise_test: Unhandled rejection with value: object "TypeError: Load failed" 12 12 PASS RequestCache "only-if-cached" (with "same-origin") does not follow redirects across origins and rejects with Etag and fresh response 13 13 PASS RequestCache "only-if-cached" (with "same-origin") does not follow redirects across origins and rejects with Last-Modified and fresh response -
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached.any.worker-expected.txt
r279344 r281012 6 6 PASS RequestCache "only-if-cached" mode checks the cache for previously cached content and does not go to the network if a cached response is not found with Etag and fresh response 7 7 PASS RequestCache "only-if-cached" mode checks the cache for previously cached content and does not go to the network if a cached response is not found with Last-Modified and fresh response 8 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Etag and fresh response promise_test: Unhandled rejection with value: object "TypeError: resource unavailable"9 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Last-Modified and fresh response promise_test: Unhandled rejection with value: object "TypeError: resource unavailable"10 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Etag and stale response promise_test: Unhandled rejection with value: object "TypeError: resource unavailable"11 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Last-Modified and stale response promise_test: Unhandled rejection with value: object "TypeError: resource unavailable"8 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Etag and fresh response promise_test: Unhandled rejection with value: object "TypeError: Load failed" 9 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Last-Modified and fresh response promise_test: Unhandled rejection with value: object "TypeError: Load failed" 10 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Etag and stale response promise_test: Unhandled rejection with value: object "TypeError: Load failed" 11 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Last-Modified and stale response promise_test: Unhandled rejection with value: object "TypeError: Load failed" 12 12 PASS RequestCache "only-if-cached" (with "same-origin") does not follow redirects across origins and rejects with Etag and fresh response 13 13 PASS RequestCache "only-if-cached" (with "same-origin") does not follow redirects across origins and rejects with Last-Modified and fresh response -
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/cc-request.any-expected.txt
r279344 r281012 11 11 PASS HTTP cache validates fresh response with ETag when request contains Cache-Control: no-cache 12 12 PASS HTTP cache doesn't reuse fresh response when request contains Cache-Control: no-store 13 FAIL HTTP cache generates 504 status code when nothing is in cache and request contains Cache-Control: only-if-cached promise_test: Unhandled rejection with value: object "TypeError: can’t load from network"13 FAIL HTTP cache generates 504 status code when nothing is in cache and request contains Cache-Control: only-if-cached promise_test: Unhandled rejection with value: object "TypeError: Load failed" 14 14 -
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/cc-request.any.worker-expected.txt
r279344 r281012 11 11 PASS HTTP cache validates fresh response with ETag when request contains Cache-Control: no-cache 12 12 PASS HTTP cache doesn't reuse fresh response when request contains Cache-Control: no-store 13 FAIL HTTP cache generates 504 status code when nothing is in cache and request contains Cache-Control: only-if-cached promise_test: Unhandled rejection with value: object "TypeError: can’t load from network"13 FAIL HTTP cache generates 504 status code when nothing is in cache and request contains Cache-Control: only-if-cached promise_test: Unhandled rejection with value: object "TypeError: Load failed" 14 14 -
trunk/Source/WebCore/ChangeLog
r281011 r281012 1 2021-08-13 Youenn Fablet <youenn@apple.com> 2 3 Overly verbose catchable fetch error messages lead to cross-origin leaks 4 https://bugs.webkit.org/show_bug.cgi?id=228861 5 6 Reviewed by Brent Fulgham. 7 8 Standardize error messages to get more uniform with other browsers. 9 To continue supporting service worker errors going to page errors, 10 we add a boolean to ResourceError to control whether sanitizing the error message or not. 11 This allows to keep error messages from service worker type exceptions to be exposed in window environments through fetch rejection. 12 Also handle ScriptModuleLoader since it is doing its own SRI checks. 13 Covered by rebased tests. 14 15 * Modules/fetch/FetchBodyOwner.cpp: 16 (WebCore::FetchBodyOwner::loadingException const): 17 * Modules/fetch/FetchResponse.cpp: 18 (WebCore::FetchResponse::BodyLoader::didFail): 19 * platform/network/ResourceErrorBase.h: 20 (WebCore::ResourceErrorBase::sanitizedDescription const): 21 (WebCore::ResourceErrorBase::isSanitized const): 22 (WebCore::ResourceErrorBase::setAsSanitized): 23 (WebCore::ResourceErrorBase::ResourceErrorBase): 24 * platform/network/cf/ResourceError.h: 25 (WebCore::ResourceError::ResourceError): 26 * platform/network/curl/ResourceError.h: 27 (WebCore::ResourceError::ResourceError): 28 * platform/network/soup/ResourceError.h: 29 (WebCore::ResourceError::ResourceError): 30 * workers/WorkerScriptLoader.cpp: 31 (WebCore::WorkerScriptLoader::loadSynchronously): 32 * workers/service/FetchEvent.cpp: 33 (WebCore::FetchEvent::createResponseError): 34 (WebCore::FetchEvent::respondWith): 35 (WebCore::FetchEvent::promiseIsSettled): 36 * workers/service/FetchEvent.h: 37 * workers/service/context/ServiceWorkerFetch.cpp: 38 (WebCore::ServiceWorkerFetch::processResponse): 39 (WebCore::ServiceWorkerFetch::dispatchFetchEvent): 40 * bindings/js/ScriptModuleLoader.cpp: 41 (WebCore::ScriptModuleLoader::notifyFinished): 42 1 43 2021-08-13 Sergio Villar Senin <svillar@igalia.com> 2 44 -
trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.cpp
r280046 r281012 390 390 { 391 391 return WTF::switchOn(m_loadingError, [](const ResourceError& error) { 392 return Exception { TypeError, error. localizedDescription().isEmpty() ? "Loading failed"_s : error.localizedDescription() };392 return Exception { TypeError, error.sanitizedDescription() }; 393 393 }, [](const Exception& exception) { 394 394 return Exception { exception }; -
trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp
r278714 r281012 299 299 300 300 if (auto responseCallback = WTFMove(m_responseCallback)) 301 responseCallback(Exception { TypeError, error. localizedDescription() });301 responseCallback(Exception { TypeError, error.sanitizedDescription() }); 302 302 303 303 if (auto consumeDataCallback = WTFMove(m_consumeDataCallback)) 304 consumeDataCallback(Exception { TypeError, error. localizedDescription() });304 consumeDataCallback(Exception { TypeError, error.sanitizedDescription() }); 305 305 306 306 if (m_response.m_readableStreamSource) { -
trunk/Source/WebCore/bindings/js/ScriptModuleLoader.cpp
r279178 r281012 402 402 if (auto* parameters = loader.parameters()) { 403 403 if (!matchIntegrityMetadata(cachedScript, parameters->integrity())) { 404 promise->reject(TypeError, makeString("Cannot load script ", integrityMismatchDescription(cachedScript, parameters->integrity())));404 promise->reject(TypeError, "Cannot load script due to integrity mismatch"_s); 405 405 return; 406 406 } -
trunk/Source/WebCore/platform/network/ResourceErrorBase.h
r264021 r281012 48 48 const String& localizedDescription() const { lazyInit(); return m_localizedDescription; } 49 49 50 String sanitizedDescription() const { return m_isSanitized == IsSanitized::Yes ? m_localizedDescription : "Load failed"_s; } 51 50 52 enum class Type : uint8_t { 51 53 Null, … … 55 57 Timeout 56 58 }; 59 enum class IsSanitized : bool { No, Yes }; 57 60 58 61 bool isNull() const { return m_type == Type::Null; } … … 67 70 Type type() const { return m_type; } 68 71 72 bool isSanitized() const { return m_isSanitized == IsSanitized::Yes; } 73 void setAsSanitized() { m_isSanitized = IsSanitized::Yes; } 74 69 75 protected: 70 76 ResourceErrorBase(Type type) : m_type(type) { } 71 77 72 ResourceErrorBase(const String& domain, int errorCode, const URL& failingURL, const String& localizedDescription, Type type )78 ResourceErrorBase(const String& domain, int errorCode, const URL& failingURL, const String& localizedDescription, Type type, IsSanitized isSanitized) 73 79 : m_domain(domain) 74 80 , m_failingURL(failingURL) … … 76 82 , m_errorCode(errorCode) 77 83 , m_type(type) 84 , m_isSanitized(isSanitized) 78 85 { 79 86 } … … 92 99 int m_errorCode { 0 }; 93 100 Type m_type { Type::General }; 101 IsSanitized m_isSanitized { IsSanitized::No }; 94 102 95 103 private: -
trunk/Source/WebCore/platform/network/cf/ResourceError.h
r238298 r281012 51 51 } 52 52 53 ResourceError(const String& domain, int errorCode, const URL& failingURL, const String& localizedDescription, Type type = Type::General )54 : ResourceErrorBase(domain, errorCode, failingURL, localizedDescription, type )53 ResourceError(const String& domain, int errorCode, const URL& failingURL, const String& localizedDescription, Type type = Type::General, IsSanitized isSanitized = IsSanitized::No) 54 : ResourceErrorBase(domain, errorCode, failingURL, localizedDescription, type, isSanitized) 55 55 , m_dataIsUpToDate(true) 56 56 { -
trunk/Source/WebCore/platform/network/curl/ResourceError.h
r233481 r281012 40 40 } 41 41 42 ResourceError(const String& domain, int errorCode, const URL& failingURL, const String& localizedDescription, Type type = Type::General )43 : ResourceErrorBase(domain, errorCode, failingURL, localizedDescription, type )42 ResourceError(const String& domain, int errorCode, const URL& failingURL, const String& localizedDescription, Type type = Type::General, IsSanitized isSanitized = IsSanitized::No) 43 : ResourceErrorBase(domain, errorCode, failingURL, localizedDescription, type, isSanitized) 44 44 { 45 45 } -
trunk/Source/WebCore/platform/network/soup/ResourceError.h
r272010 r281012 44 44 } 45 45 46 ResourceError(const String& domain, int errorCode, const URL& failingURL, const String& localizedDescription, Type type = Type::General )47 : ResourceErrorBase(domain, errorCode, failingURL, localizedDescription, type )46 ResourceError(const String& domain, int errorCode, const URL& failingURL, const String& localizedDescription, Type type = Type::General, IsSanitized isSanitized = IsSanitized::No) 47 : ResourceErrorBase(domain, errorCode, failingURL, localizedDescription, type, isSanitized) 48 48 { 49 49 } -
trunk/Source/WebCore/workers/WorkerScriptLoader.cpp
r280953 r281012 100 100 // If the fetching attempt failed, throw a NetworkError exception and abort all these steps. 101 101 if (failed()) 102 return Exception { NetworkError, error().localizedDescription() };102 return Exception { NetworkError, m_error.sanitizedDescription() }; 103 103 104 104 #if ENABLE(SERVICE_WORKER) -
trunk/Source/WebCore/workers/service/FetchEvent.cpp
r278274 r281012 62 62 } 63 63 64 ResourceError FetchEvent::createResponseError(const URL& url, const String& errorMessage )64 ResourceError FetchEvent::createResponseError(const URL& url, const String& errorMessage, ResourceError::IsSanitized isSanitized) 65 65 { 66 return ResourceError { errorDomainWebKitServiceWorker, 0, url, makeString("FetchEvent.respondWith received an error: ", errorMessage), ResourceError::Type::General };66 return ResourceError { errorDomainWebKitServiceWorker, 0, url, makeString("FetchEvent.respondWith received an error: ", errorMessage), ResourceError::Type::General, isSanitized }; 67 67 68 68 } … … 90 90 91 91 if (isRegistered == DOMPromise::IsCallbackRegistered::No) 92 respondWithError(createResponseError(m_request->url(), "FetchEvent unable to handle respondWith promise."_s ));92 respondWithError(createResponseError(m_request->url(), "FetchEvent unable to handle respondWith promise."_s, ResourceError::IsSanitized::Yes)); 93 93 94 94 return { }; … … 119 119 if (m_respondPromise->status() == DOMPromise::Status::Rejected) { 120 120 auto reason = m_respondPromise->result().toWTFString(m_respondPromise->globalObject()); 121 respondWithError(createResponseError(m_request->url(), reason ));121 respondWithError(createResponseError(m_request->url(), reason, ResourceError::IsSanitized::Yes)); 122 122 return; 123 123 } … … 126 126 auto response = JSFetchResponse::toWrapped(m_respondPromise->globalObject()->vm(), m_respondPromise->result()); 127 127 if (!response) { 128 respondWithError(createResponseError(m_request->url(), "Returned response is null."_s ));128 respondWithError(createResponseError(m_request->url(), "Returned response is null."_s, ResourceError::IsSanitized::Yes)); 129 129 return; 130 130 } 131 131 132 132 if (response->isDisturbedOrLocked()) { 133 respondWithError(createResponseError(m_request->url(), "Response is disturbed or locked."_s ));133 respondWithError(createResponseError(m_request->url(), "Response is disturbed or locked."_s, ResourceError::IsSanitized::Yes)); 134 134 return; 135 135 } -
trunk/Source/WebCore/workers/service/FetchEvent.h
r278274 r281012 70 70 bool respondWithEntered() const { return m_respondWithEntered; } 71 71 72 static ResourceError createResponseError(const URL&, const String& );72 static ResourceError createResponseError(const URL&, const String&, ResourceError::IsSanitized = ResourceError::IsSanitized::No); 73 73 74 74 private: -
trunk/Source/WebCore/workers/service/context/ServiceWorkerFetch.cpp
r278714 r281012 50 50 { 51 51 if (response.type() == ResourceResponse::Type::Error) 52 return ResourceError { errorDomainWebKitInternal, 0, response.url(), "Response served by service worker is an error"_s, ResourceError::Type::General };52 return ResourceError { errorDomainWebKitInternal, 0, response.url(), "Response served by service worker is an error"_s, ResourceError::Type::General, ResourceError::IsSanitized::Yes }; 53 53 54 54 if (mode != FetchOptions::Mode::NoCors && response.tainting() == ResourceResponse::Tainting::Opaque) 55 return ResourceError { errorDomainWebKitInternal, 0, response.url(), "Response served by service worker is opaque"_s, ResourceError::Type::AccessControl };55 return ResourceError { errorDomainWebKitInternal, 0, response.url(), "Response served by service worker is opaque"_s, ResourceError::Type::AccessControl, ResourceError::IsSanitized::Yes }; 56 56 57 57 // Navigate mode induces manual redirect. 58 58 if (redirect != FetchOptions::Redirect::Manual && mode != FetchOptions::Mode::Navigate && response.tainting() == ResourceResponse::Tainting::Opaqueredirect) 59 return ResourceError { errorDomainWebKitInternal, 0, response.url(), "Response served by service worker is opaque redirect"_s, ResourceError::Type::AccessControl };59 return ResourceError { errorDomainWebKitInternal, 0, response.url(), "Response served by service worker is opaque redirect"_s, ResourceError::Type::AccessControl, ResourceError::IsSanitized::Yes }; 60 60 61 61 if ((redirect != FetchOptions::Redirect::Follow || mode == FetchOptions::Mode::Navigate) && response.isRedirected()) 62 return ResourceError { errorDomainWebKitInternal, 0, response.url(), "Response served by service worker has redirections"_s, ResourceError::Type::AccessControl };62 return ResourceError { errorDomainWebKitInternal, 0, response.url(), "Response served by service worker has redirections"_s, ResourceError::Type::AccessControl, ResourceError::IsSanitized::Yes }; 63 63 64 64 return { }; … … 116 116 response->consumeBodyReceivedByChunk([client = WTFMove(client)] (auto&& result) mutable { 117 117 if (result.hasException()) { 118 client->didFail(FetchEvent::createResponseError(URL { }, result.exception().message())); 118 auto error = FetchEvent::createResponseError(URL { }, result.exception().message(), ResourceError::IsSanitized::Yes); 119 client->didFail(error); 119 120 return; 120 121 } … … 189 190 if (!event->respondWithEntered()) { 190 191 if (event->defaultPrevented()) { 191 client->didFail(ResourceError { errorDomainWebKitInternal, 0, requestURL, "Fetch event was canceled"_s }); 192 ResourceError error { errorDomainWebKitInternal, 0, requestURL, "Fetch event was canceled"_s, ResourceError::Type::General, ResourceError::IsSanitized::Yes }; 193 client->didFail(error); 192 194 return; 193 195 } -
trunk/Source/WebKit/ChangeLog
r281007 r281012 1 2021-08-13 Youenn Fablet <youenn@apple.com> 2 3 Overly verbose catchable fetch error messages lead to cross-origin leaks 4 https://bugs.webkit.org/show_bug.cgi?id=228861 5 6 Reviewed by Brent Fulgham. 7 8 * Shared/WebCoreArgumentCoders.cpp: 9 (IPC::ArgumentCoder<ResourceError>::encode): 10 (IPC::ArgumentCoder<ResourceError>::decode): 11 1 12 2021-08-12 Peng Liu <peng.liu6@apple.com> 2 13 -
trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp
r279872 r281012 1298 1298 return; 1299 1299 encodePlatformData(encoder, resourceError); 1300 encoder << resourceError.isSanitized(); 1300 1301 } 1301 1302 … … 1314 1315 return false; 1315 1316 1317 bool isSanitized; 1318 if (!decoder.decode(isSanitized)) 1319 return false; 1320 1316 1321 resourceError.setType(type); 1322 if (isSanitized) 1323 resourceError.setAsSanitized(); 1324 1317 1325 return true; 1318 1326 }
Note:
See TracChangeset
for help on using the changeset viewer.