Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module scripts use same-origin credentials mode by default #13176

Merged
merged 1 commit into from
Sep 26, 2018

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Sep 23, 2018

Before this CL, module scripts via <script type=module> used "omit" as
the default credentials mode. After this CL, "same-origin" is used. This
extends to module script descendants as well. Intent to implement and
ship: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/CUAxbvtnCh4.

R=[email protected], [email protected], [email protected]

Bug: 849101
Change-Id: I62617aafd3e226bc86459ec4a24138d9eac6e8ff
Reviewed-on: https://chromium-review.googlesource.com/1239638
Reviewed-by: Kouhei Ueno <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Hiroki Nakagawa <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/master@{#594305}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already reviewed downstream.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-1239638 branch 3 times, most recently from 431ffb0 to 7187550 Compare September 25, 2018 04:53
Before this CL, module scripts via <script type=module> used "omit" as
the default credentials mode. After this CL, "same-origin" is used. This
extends to module script descendants as well. Intent to implement and
ship: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/CUAxbvtnCh4.

[email protected], [email protected], [email protected]

Bug: 849101
Change-Id: I62617aafd3e226bc86459ec4a24138d9eac6e8ff
Reviewed-on: https://chromium-review.googlesource.com/1239638
Reviewed-by: Kouhei Ueno <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Hiroki Nakagawa <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/master@{#594305}
@bzbarsky
Copy link
Contributor

@domfarolino As far as I can tell, this test will now always fail in a UA that doesn't support the not-yet-final dynamic import proposal. Why was that change made? If we do want to test the dynamic import bits, shouldn't they be in a separate test, or at least a separate promise_test()?

@bzbarsky
Copy link
Contributor

(And in particular, the test became useless for the purpose of testing whether my fix for https://bugzilla.mozilla.org/show_bug.cgi?id=1493449 is actually correct...)

@domfarolino
Copy link
Member

Oh, I'm really sorry - that was a sloppy oversight. I'll move the dynamic import tests out to a separate file alongside the original. Apologies.

@bzbarsky
Copy link
Contributor

No need to apologize. I really appreciate you splitting those tests out!

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Oct 3, 2018
…rom 'omit' to 'same-origin'. r=farre

The tests come directly from
web-platform-tests/wpt#13176 and
web-platform-tests/wpt#13245

Differential Revision: https://phabricator.services.mozilla.com/D7113

--HG--
extra : moz-landing-system : lando
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Oct 6, 2018
…rom 'omit' to 'same-origin'. r=farre

The tests come directly from
web-platform-tests/wpt#13176 and
web-platform-tests/wpt#13245

Differential Revision: https://phabricator.services.mozilla.com/D7113

--HG--
extra : moz-landing-system : lando
xeonchen pushed a commit to xeonchen/gecko-cinnabar that referenced this pull request Oct 8, 2018
domenic pushed a commit to whatwg/html that referenced this pull request Oct 9, 2018
* Module scripts are always fetched with request credentials mode
  "same-origin" by default, instead of the previous default of "omit".
  Only worker module scripts can still set that to "omit", using the
  credentials option to the Worker constructor. Non-worker module
  scripts, which only have the crossorigin="" attribute available, can
  only toggle between "same-origin" and "include", similar to how
  crossorigin="" works for other platform features.
* Similarly, import() statements inside of classic scripts now use the
  "same-origin" credentials mode, instead of "omit". This affects both
  <script> elements, where the default can be changed using
  crossorigin="", and other contexts like javascript: URLs and classic
  worker scripts, where the default cannot be changed.
* The top-level script for module workers is always fetched with request
  mode "same-origin". Cross-origin workers did not quite work due to
  service workers.

Fixes #2557. Fixes #3109.

Tests:

* web-platform-tests/wpt#11274
* web-platform-tests/wpt#13176
* web-platform-tests/wpt#13426
mustaqahmed pushed a commit to mustaqahmed/html that referenced this pull request Feb 15, 2019
* Module scripts are always fetched with request credentials mode
  "same-origin" by default, instead of the previous default of "omit".
  Only worker module scripts can still set that to "omit", using the
  credentials option to the Worker constructor. Non-worker module
  scripts, which only have the crossorigin="" attribute available, can
  only toggle between "same-origin" and "include", similar to how
  crossorigin="" works for other platform features.
* Similarly, import() statements inside of classic scripts now use the
  "same-origin" credentials mode, instead of "omit". This affects both
  <script> elements, where the default can be changed using
  crossorigin="", and other contexts like javascript: URLs and classic
  worker scripts, where the default cannot be changed.
* The top-level script for module workers is always fetched with request
  mode "same-origin". Cross-origin workers did not quite work due to
  service workers.

Fixes whatwg#2557. Fixes whatwg#3109.

Tests:

* web-platform-tests/wpt#11274
* web-platform-tests/wpt#13176
* web-platform-tests/wpt#13426
mustaqahmed pushed a commit to mustaqahmed/html that referenced this pull request Feb 15, 2019
* Module scripts are always fetched with request credentials mode
  "same-origin" by default, instead of the previous default of "omit".
  Only worker module scripts can still set that to "omit", using the
  credentials option to the Worker constructor. Non-worker module
  scripts, which only have the crossorigin="" attribute available, can
  only toggle between "same-origin" and "include", similar to how
  crossorigin="" works for other platform features.
* Similarly, import() statements inside of classic scripts now use the
  "same-origin" credentials mode, instead of "omit". This affects both
  <script> elements, where the default can be changed using
  crossorigin="", and other contexts like javascript: URLs and classic
  worker scripts, where the default cannot be changed.
* The top-level script for module workers is always fetched with request
  mode "same-origin". Cross-origin workers did not quite work due to
  service workers.

Fixes whatwg#2557. Fixes whatwg#3109.

Tests:

* web-platform-tests/wpt#11274
* web-platform-tests/wpt#13176
* web-platform-tests/wpt#13426
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 3, 2019
…rom 'omit' to 'same-origin'. r=farre

The tests come directly from
web-platform-tests/wpt#13176 and
web-platform-tests/wpt#13245

Differential Revision: https://phabricator.services.mozilla.com/D7113

UltraBlame original commit: 2de25096cdd54c32488a4d5fdb1fefce6d1fb6db
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 3, 2019
…rom 'omit' to 'same-origin'. r=farre

The tests come directly from
web-platform-tests/wpt#13176 and
web-platform-tests/wpt#13245

Differential Revision: https://phabricator.services.mozilla.com/D7113

UltraBlame original commit: e2ec1eeb812d2a3178c303e9ba5538e0d2264bec
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 3, 2019
…rom 'omit' to 'same-origin'. r=farre

The tests come directly from
web-platform-tests/wpt#13176 and
web-platform-tests/wpt#13245

Differential Revision: https://phabricator.services.mozilla.com/D7113

UltraBlame original commit: 2de25096cdd54c32488a4d5fdb1fefce6d1fb6db
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 3, 2019
…rom 'omit' to 'same-origin'. r=farre

The tests come directly from
web-platform-tests/wpt#13176 and
web-platform-tests/wpt#13245

Differential Revision: https://phabricator.services.mozilla.com/D7113

UltraBlame original commit: e2ec1eeb812d2a3178c303e9ba5538e0d2264bec
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 3, 2019
…rom 'omit' to 'same-origin'. r=farre

The tests come directly from
web-platform-tests/wpt#13176 and
web-platform-tests/wpt#13245

Differential Revision: https://phabricator.services.mozilla.com/D7113

UltraBlame original commit: 2de25096cdd54c32488a4d5fdb1fefce6d1fb6db
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 3, 2019
…rom 'omit' to 'same-origin'. r=farre

The tests come directly from
web-platform-tests/wpt#13176 and
web-platform-tests/wpt#13245

Differential Revision: https://phabricator.services.mozilla.com/D7113

UltraBlame original commit: e2ec1eeb812d2a3178c303e9ba5538e0d2264bec
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request May 29, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request May 30, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request May 30, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request May 30, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request May 31, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request May 31, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request Jun 1, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request Jun 1, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request Jun 1, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request Jun 2, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request Jun 2, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request Jun 3, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request Jun 3, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request Jun 3, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request Jun 11, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request Jun 13, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request Jun 17, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request Jun 17, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request Jun 17, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request Jun 21, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request Jun 23, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request Jul 23, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request Jul 29, 2022
buttercookie42 pushed a commit to buttercookie42/Waterfox-Classic that referenced this pull request Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants