-
Notifications
You must be signed in to change notification settings - Fork 316
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
Credentials on scripts imported by importScripts() #1497
Comments
It looks like we changed It'd be useful to see what other browsers do here. cc/ @jakearchibald @annevk |
I would expect |
cc @domenic |
I agree with @annevk that I would expect it to use
I would guess this got lost when introducing module scripts, but I didn't spend the time to confirm. "same-origin" would be a nice tightening, but probably we should just go back to what the old spec says. A spec pull request and web platform tests would be very welcome, if you have the time. |
Before the new byte-for-byte checking, credentials_mode was set to kInclude for imported scripts. However, ServiceWorkerSingleScriptUpdateChecker sets the flag to kOmit because it's missed from the current spec. This CL is to correct the mode to fix the unintentional change. Spec issue: w3c/ServiceWorker#1497 Bug: 1042159 Change-Id: I553d7bec015eb4cb80f7f59c640f26491fa02b75
Before the new byte-for-byte checking, credentials_mode was set to kInclude for imported scripts. However, ServiceWorkerSingleScriptUpdateChecker sets the flag to kOmit because it's missed from the current spec. This CL is to correct the mode to fix the unintentional change. Spec issue: w3c/ServiceWorker#1497 Bug: 1042159 Change-Id: I553d7bec015eb4cb80f7f59c640f26491fa02b75
Before the new byte-for-byte checking, credentials_mode was set to kInclude for imported scripts. However, ServiceWorkerSingleScriptUpdateChecker sets the flag to kOmit because it's missed from the current spec. This CL is to correct the mode to fix the unintentional change. Spec issue: w3c/ServiceWorker#1497 Bug: 1042159 Change-Id: I553d7bec015eb4cb80f7f59c640f26491fa02b75 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032689 Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Commit-Queue: Makoto Shimazu <shimazu@chromium.org> Cr-Commit-Position: refs/heads/master@{#737253}
Before the new byte-for-byte checking, credentials_mode was set to kInclude for imported scripts. However, ServiceWorkerSingleScriptUpdateChecker sets the flag to kOmit because it's missed from the current spec. This CL is to correct the mode to fix the unintentional change. Spec issue: w3c/ServiceWorker#1497 Bug: 1042159 Change-Id: I553d7bec015eb4cb80f7f59c640f26491fa02b75 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032689 Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Commit-Queue: Makoto Shimazu <shimazu@chromium.org> Cr-Commit-Position: refs/heads/master@{#737253}
Before the new byte-for-byte checking, credentials_mode was set to kInclude for imported scripts. However, ServiceWorkerSingleScriptUpdateChecker sets the flag to kOmit because it's missed from the current spec. This CL is to correct the mode to fix the unintentional change. Spec issue: w3c/ServiceWorker#1497 Bug: 1042159 Change-Id: I553d7bec015eb4cb80f7f59c640f26491fa02b75 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032689 Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Commit-Queue: Makoto Shimazu <shimazu@chromium.org> Cr-Commit-Position: refs/heads/master@{#737253}
…as credentials, a=testonly Automatic update from web-platform-tests ServiceWorkerSingleScriptUpdateChecker has credentials Before the new byte-for-byte checking, credentials_mode was set to kInclude for imported scripts. However, ServiceWorkerSingleScriptUpdateChecker sets the flag to kOmit because it's missed from the current spec. This CL is to correct the mode to fix the unintentional change. Spec issue: w3c/ServiceWorker#1497 Bug: 1042159 Change-Id: I553d7bec015eb4cb80f7f59c640f26491fa02b75 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032689 Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Commit-Queue: Makoto Shimazu <shimazu@chromium.org> Cr-Commit-Position: refs/heads/master@{#737253} -- wpt-commits: acc51c1f9cb98db4419132c4cf8510c13e958f0f wpt-pr: 21528
…as credentials, a=testonly Automatic update from web-platform-tests ServiceWorkerSingleScriptUpdateChecker has credentials Before the new byte-for-byte checking, credentials_mode was set to kInclude for imported scripts. However, ServiceWorkerSingleScriptUpdateChecker sets the flag to kOmit because it's missed from the current spec. This CL is to correct the mode to fix the unintentional change. Spec issue: w3c/ServiceWorker#1497 Bug: 1042159 Change-Id: I553d7bec015eb4cb80f7f59c640f26491fa02b75 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032689 Reviewed-by: Hiroki Nakagawa <nhirokichromium.org> Commit-Queue: Makoto Shimazu <shimazuchromium.org> Cr-Commit-Position: refs/heads/master{#737253} -- wpt-commits: acc51c1f9cb98db4419132c4cf8510c13e958f0f wpt-pr: 21528 UltraBlame original commit: e52a0f3b0f4edb3b614ad50b400d26bbcdd3f20e
…as credentials, a=testonly Automatic update from web-platform-tests ServiceWorkerSingleScriptUpdateChecker has credentials Before the new byte-for-byte checking, credentials_mode was set to kInclude for imported scripts. However, ServiceWorkerSingleScriptUpdateChecker sets the flag to kOmit because it's missed from the current spec. This CL is to correct the mode to fix the unintentional change. Spec issue: w3c/ServiceWorker#1497 Bug: 1042159 Change-Id: I553d7bec015eb4cb80f7f59c640f26491fa02b75 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032689 Reviewed-by: Hiroki Nakagawa <nhirokichromium.org> Commit-Queue: Makoto Shimazu <shimazuchromium.org> Cr-Commit-Position: refs/heads/master{#737253} -- wpt-commits: acc51c1f9cb98db4419132c4cf8510c13e958f0f wpt-pr: 21528 UltraBlame original commit: e52a0f3b0f4edb3b614ad50b400d26bbcdd3f20e
…as credentials, a=testonly Automatic update from web-platform-tests ServiceWorkerSingleScriptUpdateChecker has credentials Before the new byte-for-byte checking, credentials_mode was set to kInclude for imported scripts. However, ServiceWorkerSingleScriptUpdateChecker sets the flag to kOmit because it's missed from the current spec. This CL is to correct the mode to fix the unintentional change. Spec issue: w3c/ServiceWorker#1497 Bug: 1042159 Change-Id: I553d7bec015eb4cb80f7f59c640f26491fa02b75 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032689 Reviewed-by: Hiroki Nakagawa <nhirokichromium.org> Commit-Queue: Makoto Shimazu <shimazuchromium.org> Cr-Commit-Position: refs/heads/master{#737253} -- wpt-commits: acc51c1f9cb98db4419132c4cf8510c13e958f0f wpt-pr: 21528 UltraBlame original commit: e52a0f3b0f4edb3b614ad50b400d26bbcdd3f20e
…as credentials, a=testonly Automatic update from web-platform-tests ServiceWorkerSingleScriptUpdateChecker has credentials Before the new byte-for-byte checking, credentials_mode was set to kInclude for imported scripts. However, ServiceWorkerSingleScriptUpdateChecker sets the flag to kOmit because it's missed from the current spec. This CL is to correct the mode to fix the unintentional change. Spec issue: w3c/ServiceWorker#1497 Bug: 1042159 Change-Id: I553d7bec015eb4cb80f7f59c640f26491fa02b75 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032689 Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Commit-Queue: Makoto Shimazu <shimazu@chromium.org> Cr-Commit-Position: refs/heads/master@{#737253} -- wpt-commits: acc51c1f9cb98db4419132c4cf8510c13e958f0f wpt-pr: 21528
Before the new byte-for-byte checking, credentials_mode was set to kInclude for imported scripts. However, ServiceWorkerSingleScriptUpdateChecker sets the flag to kOmit because it's missed from the current spec. This CL is to correct the mode to fix the unintentional change. Spec issue: w3c/ServiceWorker#1497 Bug: 1042159 Change-Id: I553d7bec015eb4cb80f7f59c640f26491fa02b75 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032689 Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Commit-Queue: Makoto Shimazu <shimazu@chromium.org> Cr-Commit-Position: refs/heads/master@{#737253} (cherry picked from commit 20aa9a3) TBR=shimazu@chromium.org Change-Id: I553d7bec015eb4cb80f7f59c640f26491fa02b75 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2037842 Reviewed-by: Krishna Govind <govind@chromium.org> Reviewed-by: Makoto Shimazu <shimazu@chromium.org> Commit-Queue: Makoto Shimazu <shimazu@chromium.org> Cr-Commit-Position: refs/branch-heads/4044@{chromium#45} Cr-Branched-From: a6d9daf-refs/heads/master@{#737173}
This is similar to whatwg/html#2557.
Chrome now has a bug around the credentials mode (issue), and I'm now wondering what is the correct value for the request's credentials mode.
As far as I read the spec, importScripts() uses fetch a classic worker-imported script which doesn't set any value to the credentials mode, while the main script is set to "same-origin". The default value of the request's credentials mode is "omit", so I think it's "omit".
I implemented the byte-for-byte checking in that way recently, but found that the existing implementation seems to use "include".
What would be the best value for that?
So far, I'm feeling that using "same-origin" would be less confusing.
The text was updated successfully, but these errors were encountered: