mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-05 14:57:30 +09:00
Bug 1493449 - Change the default credentials mode for module scripts from 'omit' to 'same-origin'
Resolves #2642
This commit is contained in:
parent
ea2268b5e8
commit
32498a0694
1 changed files with 2 additions and 3 deletions
|
|
@ -1307,9 +1307,8 @@ ScriptLoader::StartLoad(ScriptLoadRequest *aRequest, const nsAString &aType,
|
||||||
// According to the spec, module scripts have different behaviour to classic
|
// According to the spec, module scripts have different behaviour to classic
|
||||||
// scripts and always use CORS.
|
// scripts and always use CORS.
|
||||||
securityFlags = nsILoadInfo::SEC_REQUIRE_CORS_DATA_INHERITS;
|
securityFlags = nsILoadInfo::SEC_REQUIRE_CORS_DATA_INHERITS;
|
||||||
if (aRequest->CORSMode() == CORS_NONE) {
|
if (aRequest->CORSMode() == CORS_NONE ||
|
||||||
securityFlags |= nsILoadInfo::SEC_COOKIES_OMIT;
|
aRequest->CORSMode() == CORS_ANONYMOUS) {
|
||||||
} else if (aRequest->CORSMode() == CORS_ANONYMOUS) {
|
|
||||||
securityFlags |= nsILoadInfo::SEC_COOKIES_SAME_ORIGIN;
|
securityFlags |= nsILoadInfo::SEC_COOKIES_SAME_ORIGIN;
|
||||||
} else {
|
} else {
|
||||||
MOZ_ASSERT(aRequest->CORSMode() == CORS_USE_CREDENTIALS);
|
MOZ_ASSERT(aRequest->CORSMode() == CORS_USE_CREDENTIALS);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue