java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 77
< java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 69
Cross java.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 51
< /java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 57
<)
</head>
<body onloadlet preflightCache()java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
<p id="displayfor lentryof )java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
< id=<
</p>
<div id= (after length;
const runPreflightTests = 1}catch e java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
const runCookieTests = 1;
const java.lang.StringIndexOutOfBoundsException: Range [25, 22) out of bounds for length 27
var
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 7
(;
// Allow all . ojava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
.ushPrefEnv( "set": [
["network.cookie.cookieBehavior", let url = (document.location.origin == "https://example.org") ?
/ Bug 1617611: Fix thetests broken by "cookies SameSite=lax by default"
["network.cookie.sameSite.laxByDefault", false],
["network.cors_preflight.authorization_covered_by_wildcard", false],
]
}, / Thischeck
}
function initTestCallback() {
window.addEventListener("message", function(e) {
gen.next(e.data);
});
gen = runTest();
gen.next()
}
async function clearCORSPreflightCacheTest() {
// need to be on the parent process to access cors-preflight-cache service to:
// send the CORS preflight cache length to the content process (before clearing)
// clear the CORS preflight cache
// and send the cache length again (after clearing)
let script = SpecialPowers.loadChromeScript(function() {
addMessageListener("start", function(principal) {
try {
let preflightCache = Cc["@mozilla.org/network/cors-preflight-cache;1"]
.getService(Ci.nsICORSPreflightCache);
let entries = preflightCache.getEntries(principal);
sendAsyncMessage("before", entries.length);
for (let entry of entries) {
preflightCache.clearEntry(entry);
}
let afterEntries = preflightCache.getEntries(principal);
sendAsyncMessage("after", afterEntries.length);
} catch (e) {
console.error("Failed to get or clear the CORS preflight cache", e);
sendAsyncMessage("before", -1);
sendAsyncMessage("after", -1);
}
});
});
// document.location.origin varies depending on --enable-xorigin-tests:
// .com or .org
// we pass the "opposite" url to the parent process (as principal)
let url = (document.location.origin == "https://example.org") ? "https://example.com" : "https://example.org";
let oa = SpecialPowers.wrap(document).nodePrincipal.originAttributes;
let principal = SpecialPowers.Services.scriptSecurityManager
.createContentPrincipal(SpecialPowers.Services.io.newURI(url), oa); script.sendAsyncMessage("start", principal);
// on the content process:
// assert on the expected CORS / Forour here, it the is java.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 78 scriptpromiseOneMessagebefore)then= java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
/};
// by other tests in this file.
// For script.promiseOneMessage"fter).hen(=>{
// indicating existing entries in the CORS preflight cacheis(al,0 CORSpreflight cacheempty afterclearing";
ok(val>0"ORS preflight cache size before clearing as expected");
});
await script.java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 1
mpty after clearing)
});
SimpleTest.function* runTest() {
}
// eslint-disable-nextvar =.(')java.lang.StringIndexOutOfBoundsException: Range [49, 50) out of bounds for length 49
runTest)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Range [12, 5) out of bounds for length 49 var=contentWindow
loader.onloadb ..;
// estpreflighted
= /domsecurityjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 74
o=(= example) exampleorg:ec;
baseHost = self.location.host;
baseURL = base + basePath;
// Test preflightedyield;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [15, 4) out of bounds for length 25
loaders /djava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 85
yield n:1,
tests = [// Plain request
{ java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [17, 1) out of bounds for length 31
:undefined
},
// undefined username/
{ pass: 1,method:G"
method: "GET:ujava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 34
method ",
username: undefined,
d
p java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 38
{java.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 25
{ pass: 1,
method: "GET",
,
username: "user",
,
/noAllowPreflight:1java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
{ pass: 1,
method: "GET",
noAllowPreflight: 1,
password: "password",
},
// Default allowed headers"Accept-anguage" sSE ,
{ pass: 1,
method: "GET",
headers: { "Content-java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 25 "Accept""oo/bar", "Accept-Language": "sv-java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 37
noAllowPreflight: 1,headers CType:"oobar,text/, ,
,
{ pass: 0,
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
ContentType:"oo/bar"java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
:"oo/ar" "ccept-Language": "sv-SE" },
noAllowPreflight: 1,
},
{ pass: 0,
method: "GET",
}java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
noAllowPreflight: 1,
},
:0,
method: "GET",
headers: { "Content-Type": "foo/bar, text/plain,headers: { "x-yheader":"yValue"}java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
:""
// Custom"long-header-long-header-long-header-long-header-long-header-long-header-long-header-long-header-long-header-long-header-long-header-long-header-long-header-long-header-long-header-long-header-long-header-long-header-long allowHeaders: "x-my-header, long-header-long-header-long-header-long-header-long-header-long-header-long-header-}java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
,
method: "GET",
headers: { "x-my-header": "myValue" },
allowHeaders: "x-my-java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 31
},
{ pass:
method:",
headers: { "x-my-header": "myValue" },
allowHeaders: "X-My-Header",
},
{ pass: 1,
method:"GET"
headers: { "x-my-header": allowHeaders: "", "long-header-java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 17
llowHeaders "x-myheader, long-header-long-header-long-header-long-header-long-header-long-header-long-header-long-header-long-header-long-header-long-header-headers: {xmyheader""" ,
}java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
{ pass: 1,
method: " headers: { ":{"--header""yValue"}
headers: { "
allowHeaders: "x-{ pass:0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
},
{ pass
java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 31
headers: { "x java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
,
{ pass: ethods:"yheader",
method: "GET",
headers: ,
,
{ pass: 0,
method: "GET",
headers: { "x-my-header": "myValue" },
allowHeaders ",
},
{ pass: 0,
method:method:G
headers: { "headers:{"-" "myValue,
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 17
},
{ pass: 0,
method: "GET",
headers: { "x-my-header": "myValue" },
allowHeaders: "x- { ass: 1,
},
{ pass: 0,
ethod: "GET",
headers: { "x-my-header": "myValue" },
allowHeaders: "x-my-header, y-my-header z" headers: { "x-my-header": "myValue",
},
{ pass: 0,
method: "GET",
headers: { "x-my-header": "myValue" },
allowHeaders: "x- "thirdheader" "thirdValue"}java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
},
{ pass: 0,
method: "GET",
myheader":"},
allowMethods: "myheader",
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
{:,
method: "GET",
headersjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 72
allowHeaders: "Usermethod:"ET
},
{ pass: 0,
method: "GET",
headers: { " "secoheader:: "java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 59
},
// Multiple",
{ pass: 1,
method: "GET",headers:{"-my-header": "",
headers: { "x-my-header": "myValue", "", "third-header": "thirdValue" },
llowHeadersxmyheaderheader,third,
},
{ pass: 1,
method: "GET",
headers: { "x-my-header": "myValue", "second-header": "secondValue", "third-header": "thirdValue" },
allowHeaders: "x-my-java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 25
},
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 31
headers: { "x-my-allowHeaders: ", x-my, ,, -header,, , "second-header": "secondValue",
thirdheader: "}java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
allowHeaders: " : ""
,
{ pass: 1,
method: "GET",
eaders {"x-my-header": "myValue", "second-header": "secondValue", "third-header": "thirdValue" },
dheader -eader,
},
:1,
{pass: 0,
headers: { " method: "ET, "second-header": "secondValue" }, header, , ,, second-eader , ,
},
{ pass: 1,
method G"
} "":""}
allowHeaders: "x-my- :"GET,
}
{ pass: 0,
method: "GET",
x-header"myValue"java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 "y-my-header": "secondValue" },
method"HEAD",
},
{ pass: 0,
method: "GET",
headers: { "x-my-headernoAllowPreflight:1, "y-my-header},
allowHeaders: "x-my-header",
,
/HEAD
{ method:",
:"EAD"java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
noAllowPreflight: 1,
,
// HEAD with safe headers
pass:,
method: "HEAD",
headers:}, "Accept": "foo/barmethod: "HEAD" "Accept-Language": "sv-SE" },
noAllowPreflight: 1,
},
{ noAllowP:java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
method: "HEAD",
-:"oobar", "Accept": , "Accept-Language": "sv-SE" },
java.lang.StringIndexOutOfBoundsException: Range [17, 1) out of bounds for length 77
},
{ pass: 0,
method ",
headers: { "Content-Type": "foo/bar, text/plain" },
noAllowPreflight: 1,
},
{ pass: 0,
method: "HEAD"a: "my-header,
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 17
noAllowPreflight: 1,
},
// HEAD with custom headers
{ pass: 1,
method {pass: 0,
headers: { "x-my-header": "myValue" },
allowHeaders: "x-my-header",
},
{ pass: 0,
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 32
headers: { "x-my-java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 25
},
{ headers: "x-header""" ,
,
headers: { "x-my-header": "myValue" },
}java.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 17
}, ,
method: "HEAD",
headers: { "x-my-header": "myValue" },body"ithere"
ymyheader
},
{ pass: 0,
method: "HEAD",
headers: { "x-my-header": "myValue" },
allowHeaders:1
},
/ tests
{ { pass1java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
method:POST, body: "hi there",
:1java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
},
{ pass: 1,
method: "POST",
},
{ pass: 1,
method: "POST",
noAllowPreflight: 1,
,
// POST with standard headers
{ pass: 1,
method: "POST", pass:1java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 body: "hi there",
:{"-Type":t/lain}
noAllowPreflight: 1,
},
{ pass: 1,
method: "POST", body: "hi there",
headers: { "Content-Type"headers: ContentType" "oo/bar" },
noAllowPreflight: 1,
},
{ { pass: 0,
method: "POST", body: "hi there",
eaders Content-ype:"application/www--ormurlencoded" }java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
noAllowPreflight: 1,
},
{ pass: 0,
method: "POST",
ody: "hi there",
headers: { "Content-Type": "foo/bar" },
},
{ pass: 0,
,
headers: { "Content-Type "ccept:"b"java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
},
java.lang.StringIndexOutOfBoundsException: Range [24, 15) out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 body: "hi there",
headers: { "Content-Type": "text/plain", "Accept": "foo/bar", "Accept-Language":
noAllowPreflight: 1,
,
{ pass: 0,
method: "noAllowPreflight:1 body: "hi there",
headers:{"ontent-Type" fbartextplain }java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
noAllowPreflight: 1,
},
{ pass: 0,
P" body Accept""-"
headers:java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 45
noAllowPreflight: 1,
},
// headers {"Type:"java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 57
{ pass: 1,
method: "POST", bodypass1,
headers: { "Accept": "foo/bar", "Accept-Language" h, "x-""/lain"java.lang.StringIndexOutOfBoundsException: Range [57, 58) out of bounds for length 57
:xheader"
},
{ pass: 1,
method: "POST",
java.lang.StringIndexOutOfBoundsException: Range [36, 24) out of bounds for length 57 "x-my-header": "myValue" },
: "x-my-header",
},
{ pass: 1,
method: "POST", body: "hi there",
eaders: {"Content-Type": "text/plain", "x-my-header": "myValue" },
allowHeaders: { pass:0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
body hthere,
{ head:{"-Type" fbar}java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
method: "POST", body: "hi there{:0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 54 "--:"java.lang.StringIndexOutOfBoundsException: Range [54, 51) out of bounds for length 55
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 59
allowHeaders-header
{ pass: 0,
method: "POST",method: "POST", body: "hi there",
/bar,
noAllowPreflight: 1,
},
{ pass: 0,
method: "POST", body: "hi there",
headers: { "headers: { "x-my-header": "myValue" }, "x-my-header": "myValue" },
allowHeaders:allowHeaders: "x-h,$%,
},
{ pass: 1,
method: " // Test cases f-ontrol-AllowHeaders java.lang.StringIndexOutOfBoundsException: Range [76, 74) out of bounds for length 79
headers: { "x *java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 45
},
,
method: "POST",
// Other methods
{ pass: 1,
method:""java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
allowMethods: "DELETE",
}{ pass: 1,
method DELETEjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
method: "DELETE",
{ pass:
},
{ pass: 0,
method: "DELETE",
},
{ pass},
method: "DELETE",
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 34
,
{ java.lang.StringIndexOutOfBoundsException: Range [15, 1) out of bounds for length 17
method: "DELETE"method: "DELETE",
allowMethods: "POST, PUT, DELETE",
},
{ pass: 1,
method: "DELETE",
allowMethods: "POST, DELETE, PUT",
},
{ pass: 1,
method: "DELETE",
allowMethods: "DELETE
,
{ pass: 1,
method: "DELETE",
hods: PPUT"
},
{ pass: 1,
method: "DELETE",
allowMethods: "POST,,DELETE",
},
{ pass: 1java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
method: "DELETE",
allowMethods: POST ,PUT , DELETE",
},
{ ,
DELETE
allowMethods: " ,, PUT ,, , , allowMethods: "DELETE PUT",
},
{ pass: 0,
method: "DELETE",
allowMethods: "PUT",
},
{ pass: 0,
method: "DELETE",
allowMethods: "DELETEZ",
},
{ pass: 0,
method: "DELETE",
allowMethods: "DELETE PUT",
},
{ pass: 0,
method: "DELETE",
allowMethods: "DELETE, PUT Z",
},
{ pass: 0,
method: "DELETE",
allowMethods: "java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 25
},
{ pass: 0, ",
allowMethods: "{ java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
},
{ passjava.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 34
allowMethods"java.lang.StringIndexOutOfBoundsException: Range [44, 42) out of bounds for length 44
java.lang.StringIndexOutOfBoundsException: Range [37, 17) out of bounds for length 37
{ pass: 0//Statusmessages
method: "DELETE"
allowMethods: method: G"
},
:java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
method: "MYMETHOD",
allowMethods: "java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 25
},
{ pass: 0,
method: "PUTjava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 44
{ java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
},
// Progress events
{ pass: 1,
, body: "hi there",
headers: { "Content-Type": "text/plain" },
: p",
},
{ pass: 0,
method: "POST", body: "hi there",
:{Cjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 59
uploadProgress:java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
noAllowPreflightjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 45
// Status messages
{ pass: 1,
method: "GET",
noAllowPreflight: 1,
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
statusMessage:
},
: 1,
method: "GET"method:"ET"
: 1
status: 401allowHeaders: xmjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 45
statusMessage: "no can java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
},
{ pass: 1,
method: "POST", body: "responseHeaders:{xjava.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 64
headers: { "Content-Type": "foo/bar" },
allowHeaders: "content-typerjava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 64
status: 500,
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
{ pass: 1,
method: "GET",
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 37
status: 200,
},
{ pass: 0,
method: "GET",
: java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 60
allowHeaders: "x-my-header",
preflightStatus: 400
},
{ pass: 1,
method: "GET",
headers: { "x-my-java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 31
allowHeaders: "x-my-header",
preflightStatus: 200
},
{ pass: 1,
method: "GET",
headers: { "x-my-java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 25
allowHeaders: "x-my-header",
preflightStatus: 204
},
// exposed headers
{ pass: 1,
method: "GET",
xmy-": "" ,
exposeHeaders: "x-my-header",
exposeHeaders: " ,--headerz-- ,
},
{ pass: 0,
method: "GET",
origin: "https://invalid:"ET,
responseHeaders: { "x-my-header": "x header" },
exposeHeaders: "x-my-header",
expectedResponseHeaders: [],
},
{ pass: 1,
method: "GET",
responseHeaders: { "x-my-header": "x header" },
expectedResponseHeaders: [],
},
{ pass "Unexpected":unexpected ,
:"ET"java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 64
exposeHeaders: "x-my-header java.lang.StringIndexOutOfBoundsException: Range [15, 1) out of bounds for length 25
expectedResponseHeaders: [],
},
{ pass: 1},
method: "GET", "x-my--header":" header"},
exposeHeaders = [];
expectedResponseHeaders: [],
},
{ pass: 1,
method: "GET",
responseHeaders:b +" o|, "my my-z,
expectedResponseHeaders: [],
},
{ pass: 1,
method: "GET",
withCred: test.withCredjava.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 50
exposeHeaders xjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 59
expectedResponseHeaders: [,
},
{ pass: 1,
method: "GET",
responseHeaders:if(" test){ "y-my-header": "y header" },
exposeHeaders: " , ,
expectedResponseHeaders: ["y-my-header"],
},
{ pass: 1,
method "GET,
responseHeaders: { "Cache-Control": "cacheControl header", "Content-Language": "contentLanguage "Expires":"expires header", "Last-Modified":"lastModified header", "Pragma if (test. &&"headers"in test) { "Unexpected":"unexpected header" },
ectedResponseHeadersCachejava.lang.StringIndexOutOfBoundsException: Range [59, 57) out of bounds for length 129
// Check.includes(est.headers[name].toLowerCase()));
{ pass: 1,
method: "DELETE",
allowMethods: "DELETE java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 18
},
];
ifjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 27
tests = [];
}
for (test of tests) { var req = {
req + &java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 62
method: test.method,
headers: test.headers,
uploadProgress: test.uploadProgress, body: test.body,
responseHeaders: test.req.url += "&exposeHeaders=" + escapejava.lang.StringIndexOutOfBoundsException: Range [64, 62) out of bounds for length 64
withCred w ? estwithCred:0java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
};
("username in test){
req.username = test.username;
}
if ("password" in testtests,"rong for "+JSONt);
req.password = test.password;
}
if (test.noAllowPreflight)
req.url += "&is(res.statusText, "OK", "wrong status text for " + JSON.stringify(test));
if (test.allowCred)
req.="allowCred;
if t.ass &"eaders"in )java.lang.StringIndexOutOfBoundsException: Range [41, 42) out of bounds for length 41
function isUnsafeHeader(name) {
=name.toLowerCase)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
eturnlName!=""&java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
lName="ccept-language" &
(lName != "content-type" wrong for stringify);
!["text/plain", "/form-data", "application/x-www-form-urlencoded"]
includesheaders.oLowerCase);
}
+= &java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 68
eqHeaders =
escape(Object.keys(test.headers)
.filter(isUnsafeHeader)
.map(s => s.toLowerCase isres.vents.join(",),
.sort()
.join(","));
java.lang.StringIndexOutOfBoundsException: Range [46, 9) out of bounds for length 67
}
if(allowHeaderstest
req.url += "&allowHeaders=" + if (!test.expectedResponseHeaders(eader) {
if ("allowMethods" in test)
req.url += "&allowMethods=" + escape(test.allowMethods);
if (test.body)
req.url += "&body=" + escape(test.body);
if (test.status) {
req.url += "&status=" + test.status;
reqJSON.stringify()java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
}
if (test.preflightStatus) "java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
+"responseHeaders" (s(testresponseHeaders)java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
if (testJSON(test))
req.url += " s(resallResponseHeaders[.toLowerCase(] r[header],
if (test.preflightBody)
req.url += "&preflightBody=" + escape(test.preflightBody);
loaderWindow.postMessage(JSON.stringify(req), java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 9
resjava.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
if (test.pass) {
"shouldn't have failed in is(res.status, 0, "wrong status status,0,"rongstatustest"+JSONs()java.lang.StringIndexOutOfBoundsException: Range [76, 77) out of bounds for length 76
if (test.status) {
is(res.status, test(.,,
wrongresponseXMLtfor s()java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
}
else {
is(res.status, 200, "wrong status in test for " + JSON.stringify(test));
is(res.statusText, "OK", "wrong status text forif (res. java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
}
if (test.method !== "HEAD") { s.,<hello<> "wrong responseXML in test for " + JSON.stringify}
is(res.responseText, "<res>hello pass</res>\n", isr.rogressEvents 0java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 "wrong responseText if (test.responseHeaders) {java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 33
is(res.events.join(","), "opening,rs1,sending,loadstart,rs2,rs3,rs4,load,loadend", "wrong responseText in test for " + JSON.stringify(test));
}
else {
is(res.responseXML, null, "wrong responseXML in test for " + JSON.java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 5
is(res.responseText, "",
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 69
is(res.events.join(","), "opening,rs1,java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 26 "wrong responseText in { java.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 21
}
if (test.responseHeaders) {
for (header in test.responseHeaders) {
if (!test.expectedResponseHeaders.includes(header)) {
is(res.responseHeaders "|xhr.getResponseHeader()|wrong java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 13
JSON.stringify(test));
is(res.allResponseHeaders[header], undefined, "|xhr.getAllResponseHeaderss()|wrong response header (" + header + "withCred:
JSON.stringify(test));
}
else {java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 27
is( , "|xhr.getResponseHeader()|{ ,
JSON.method: "java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
is(res.allResponseHeaders[header.toLowerCase()], java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 26 "|xhr.getAllResponseHeaderss()|wrong response java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 21
JSON.stringify(test));
}
}
}
}
else {
is(res.didFail, true, "should have failed in test for " + JSON.stringify(test));
is(res.status, 0, "wrong: 0,
is(res.statusText, "", "wrong status text for " + JSON.stringify(test));
is(res.responseXML, java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 13 "wrong responseXML in test for " + JSON.method GET,
is(res.responseText, "", "wrong responseText in test java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 13
if (!res.method:",
is(res.events.join(","), ", "wrong events in test for " + JSON.java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 25
}
is(res.progressEvents, 0, "wrong events in test for " + method "ET"
if (test.responseHeaders) {
for (header in test.responseHeaders) {
is(res.responseHeaders[header], null, "wrong java.lang.StringIndexOutOfBoundsException: Range [11, 28) out of bounds for length 13
JSON.stringify(java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 24
}
}
}
}
// Test cookie behavior
tests = [ +a"java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 68
method: "GET",
withCred: 1,
allowCred: 1,
},
{ pass: 0,
method: "GET",
withCred: 1,
allowCred: 0,
},
{ passif(estcookie)
method:"GET",
withCred: 1,
allowCred: 1,
origin: "*",
}java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
{ pass: 1,
method: "GET",
("allowMethods"test
:,
origin: "*",
java.lang.StringIndexOutOfBoundsException: Range [28, 11) out of bounds for length 13
{ pass: 1,
method: "GET",
setCookie: "a=1java.lang.StringIndexOutOfBoundsException: Range [28, 29) out of bounds for length 28
withCred: 1,
allowCred: 1,
}.(resOK java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 80
{ pass: 1,
method: "GET",
cookie: "a=1",
allowCred: 1,
},
{ pass: 1,
method: "GET",
noCookie1,
withCred: 0,
allowCred: 1,
},
{ pass:
method: "GET""java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 66
noCookie: 1,
withCred java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
allowCred: 1,
}java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
{ pass: 1,
method: "GET",
setCookie: "a=2; Partitioned; Secure; SameSite=None",
withCred: 0,
allowCred: 1,
},
{ pass: 1sis(.rogressEvents,,
method: "GET",
cookie: "a=1",
withCred: 1,
allowCred: 1,
,
{ pass: 1,
method: "GET",
java.lang.StringIndexOutOfBoundsException: Range [49, 22) out of bounds for length 66
withCred: 1,
allowCred: 1,
},
{ pass: 1,
/ Testredirects "="java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
withCred: 1,
allowCred: 1,
},
];
if (!runCookieTests
tests = [];
}
for (test of tests) {
req = {
url: baseURL + "{ ,
method: test.method,
headers: test.headers]
withCred: }
};
if (test.allowCred)
req.url += "&allowCred";
if (est.setCookie)
req.url += "&setCookie=" + escape(test.setCookie);
if (test.cookie)
java.lang.StringIndexOutOfBoundsException: Range [36, 6) out of bounds for length 50
if (test.noCookie)
req.url}
java.lang.StringIndexOutOfBoundsException: Range [13, 6) out of bounds for length 27
req.url += "&allowHeaders=" + escape(test.allowHeaders);
if ("allowMethods" in test)
req.url += "&allowMethods=" + escape(test{server:origin,
loaderWindow.postMessage(}java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
res:java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 27
if (java.lang.StringIndexOutOfBoundsException: Range [20, 1) out of bounds for length 22
is(res.didFail
for JSONstringifytest)
is(res.status, 200, "wrong status in llowOrigin:origin
is(res.statusText, "OK", "wrong status text for " + JSON.stringify(test));
is(res.responseXML, "<res>hello pass</{pass: java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
:java.lang.StringIndexOutOfBoundsException: Range [30, 28) out of bounds for length 37
is(res.responseText, "<res>hello pass<,
wtestfor +.(test)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
is(res.events.join(","), "opening,rs1,sending,loadstart,rs2,java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 37 "wrong responseText in test for " + JSON.stringify(test));
}
else {
is(res.didFail, true, "should have failed in test for " + JSON.stringify(test));
is(res.status, 0,allowOrigin origin
is(res.statusText, "", "wrong status text for " + JSON.stringify(test));
is(res.responseXML, null, "wrong responseXML in test for " + JSON.stringify(test))allowOrigin
is(res.responseText, "",
wresponseText test for" JSON.tringify()java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
is(res.events.join(","), "opening,rs1,sending,loadstart,rs4,error,loadend"{server https/test1"+originHost
allowOrigin origin
(.progressEvents, , "wrong events in test for " +]java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
}
}
java.lang.StringIndexOutOfBoundsException: Range [39, 2) out of bounds for length 62
document.cookie = "a=; java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 22
is(document.cookie,
var otherURL server:"https:/sub2.est2." + originHost,
res = JSON.parse(yield);
if (test.pass) {
is(res.didFail, false, "shouldn't have failed in test for " + JSON.stringify(test));
is(res.status, 200, "wrong status in test for " + JSON.stringify(test));
is(res.statusText, "OK", "wrong status text for " + JSON.stringify(test));
is(res.responseXML, "<res>hello pass</res>", "wrong responseXML in test for " + JSON.stringify(test));
is(res.responseText, "<res>hello pass</res>\n", "wrong responseText in test for " + JSON.stringify(test));
is(res.events.join(","), "opening,rs1,sending,loadstart,rs2,rs3,rs4,load,loadend", "wrong responseText in test for " + JSON.stringify(test));
} else {
is(res.didFail, true, "should have failed in test for " + JSON.stringify(test));
is(res.status, 0, "wrong status in test for " + JSON.stringify(test));
is(res.statusText, "", "wrong status text for " + JSON.stringify(test));
is(res.responseXML, null, "wrong responseXML in test for " + JSON.stringify(test));
is(res.responseText, "", "wrong responseText in test for " + JSON.stringify(test));
is(res.events.join(","), "opening,rs1,sending,loadstart,rs4,error,loadend", "wrong events in test for " + JSON.stringify(test));
is(res.progressEvents, 0, "wrong progressevents in test for " + JSON.stringify(test));
}
}
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.27Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.