WebKit Bugzilla
Attachment 347456 Details for
Bug 168649
: Relax Request constructor around referrers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-168649-20180819123556.patch (text/plain), 8.88 KB, created by
Rob Buis
on 2018-08-19 03:35:57 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Rob Buis
Created:
2018-08-19 03:35:57 PDT
Size:
8.88 KB
patch
obsolete
>Subversion Revision: 235015 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 2195422db9aba4b42b2a1f68c13807b5f8c21d2c..dc8f8eb1f8cf9161aa592417855259f19abf4887 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,25 @@ >+2018-08-19 Rob Buis <rbuis@igalia.com> >+ >+ Relax Request constructor around referrers >+ https://bugs.webkit.org/show_bug.cgi?id=168649 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Implement remaining part of fetch change >+ https://github.com/whatwg/fetch/pull/377, i.e. >+ if "parsedReferrerâs origin is not same origin with origin", >+ then set requestâs referrer to "client", instead of >+ throwing an exception [1]. >+ >+ WebKit's new behavior matches that of Chrome and Firefox. >+ >+ Testing is covered by existing wpt tests. >+ >+ [1] Step 15.3.3 of https://fetch.spec.whatwg.org/#main-fetch >+ >+ * Modules/fetch/FetchRequest.cpp: >+ (WebCore::computeReferrer): >+ > 2018-08-18 David Kilzer <ddkilzer@apple.com> > > Let Xcode have its way with the WebCore project >diff --git a/Source/WebCore/Modules/fetch/FetchRequest.cpp b/Source/WebCore/Modules/fetch/FetchRequest.cpp >index 7cbc6328526efba9174802dcfe1c26fbea555050..718dbecca0e80ba634a3b7740b089962ea600d90 100644 >--- a/Source/WebCore/Modules/fetch/FetchRequest.cpp >+++ b/Source/WebCore/Modules/fetch/FetchRequest.cpp >@@ -59,7 +59,7 @@ static ExceptionOr<String> computeReferrer(ScriptExecutionContext& context, cons > return String { "client" }; > > if (!(context.securityOrigin() && context.securityOrigin()->canRequest(referrerURL))) >- return Exception { TypeError, "Referrer is not same-origin."_s }; >+ return String { "client" }; > > return String { referrerURL.string() }; > } >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 3ac24c363dc74ee9dd2c7df30425d55cb65c6326..977c8ffaec2d29f7a881bb2753d7c01e66250c41 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,12 @@ >+2018-08-19 Rob Buis <rbuis@igalia.com> >+ >+ Relax Request constructor around referrers >+ https://bugs.webkit.org/show_bug.cgi?id=168649 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-init-001.sub-expected.txt: >+ > 2018-08-18 Ali Juma <ajuma@chromium.org> > > [IntersectionObserver] Fire an initial dummy notification >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index 7cb688b85e0fb9deca88402f658274cf276a0f72..715d12ae4918707d4c4ca05f1a70d2e92f17b09e 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,15 @@ >+2018-08-19 Rob Buis <rbuis@igalia.com> >+ >+ Relax Request constructor around referrers >+ https://bugs.webkit.org/show_bug.cgi?id=168649 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * web-platform-tests/fetch/api/policies/referrer-origin-expected.txt: >+ * web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt: >+ * web-platform-tests/fetch/api/policies/referrer-origin-worker-expected.txt: >+ * web-platform-tests/fetch/api/request/request-init-001.sub-expected.txt: >+ > 2018-08-18 Ali Juma <ajuma@chromium.org> > > [IntersectionObserver] Fire an initial dummy notification >diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-expected.txt >index 4050659c95d462af7536ab9888f831c4594f6282..49c2eab6a24790dd11e4e13fd2333e2da6728e71 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-expected.txt >@@ -1,4 +1,4 @@ > > PASS Request's referrer is origin >-FAIL Cross-origin referrer is overridden by client origin promise_test: Unhandled rejection with value: object "TypeError: Referrer is not same-origin." >+PASS Cross-origin referrer is overridden by client origin > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt >index 34b84d362e4dba403e8f88b9952a06eabc31484a..3bec87d27e396a90cb7b22e2b31cdcf7263fa925 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt >@@ -1,5 +1,5 @@ > > PASS Fetch in service worker: referrer with no-referrer policy > FAIL Request's referrer is origin assert_equals: request's referrer is https://localhost:9443/ expected "https://localhost:9443/" but got "https://localhost:9443/fetch/api/policies/referrer-origin.js?pipe=sub" >-FAIL Cross-origin referrer is overridden by client origin promise_test: Unhandled rejection with value: object "TypeError: Referrer is not same-origin." >+FAIL Cross-origin referrer is overridden by client origin assert_equals: request's referrer is https://localhost:9443/ expected "https://localhost:9443/" but got "https://localhost:9443/fetch/api/policies/referrer-origin.js?pipe=sub" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-worker-expected.txt >index 7e54fd268b91c96ef29b805e243d2531f8ecd18a..c22625140fba61bec18c0ca792f30eaf553d21ee 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-worker-expected.txt >@@ -1,4 +1,4 @@ > > FAIL Request's referrer is origin assert_equals: request's referrer is http://localhost:8800/ expected "http://localhost:8800/" but got "http://localhost:8800/fetch/api/policies/referrer-origin.js?pipe=sub" >-FAIL Cross-origin referrer is overridden by client origin promise_test: Unhandled rejection with value: object "TypeError: Referrer is not same-origin." >+FAIL Cross-origin referrer is overridden by client origin assert_equals: request's referrer is http://localhost:8800/ expected "http://localhost:8800/" but got "http://localhost:8800/fetch/api/policies/referrer-origin.js?pipe=sub" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-init-001.sub-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-init-001.sub-expected.txt >index 3ccaebc7c380d37f025b4046019fb9bbdd633d6f..8b4b1efc2ff8a49cc1f8dda2c133314b499d29b0 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-init-001.sub-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-init-001.sub-expected.txt >@@ -9,7 +9,7 @@ PASS Check method init value of head and associated getter > PASS Check referrer init value of /relative/ressource and associated getter > PASS Check referrer init value of http://localhost:8800/relative/ressource?query=true#fragment and associated getter > PASS Check referrer init value of http://localhost:8800/ and associated getter >-FAIL Check referrer init value of http://test.url and associated getter Referrer is not same-origin. >+PASS Check referrer init value of http://test.url and associated getter > PASS Check referrer init value of about:client and associated getter > PASS Check referrer init value of and associated getter > PASS Check referrerPolicy init value of and associated getter >diff --git a/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-init-001.sub-expected.txt b/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-init-001.sub-expected.txt >index 78581d8e30edfca3d7ad9989728d802e99d56f38..c04aecb155d54df8505aef6123e4886f74545bb0 100644 >--- a/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-init-001.sub-expected.txt >+++ b/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-init-001.sub-expected.txt >@@ -9,7 +9,7 @@ PASS Check method init value of head and associated getter > PASS Check referrer init value of /relative/ressource and associated getter > PASS Check referrer init value of http://localhost:8800/relative/ressource?query=true#fragment and associated getter > PASS Check referrer init value of http://localhost:8800/ and associated getter >-FAIL Check referrer init value of http://test.url and associated getter Referrer is not same-origin. >+PASS Check referrer init value of http://test.url and associated getter > PASS Check referrer init value of about:client and associated getter > PASS Check referrer init value of and associated getter > PASS Check referrerPolicy init value of and associated getter
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 168649
:
347456
|
347457
|
347486