Follow-on fix for bug 457825. Use sheet principal for agent and user sheets. r=dbaron...
[wine-gecko.git] / netwerk / test / unit / test_bug380994.js
blobbf718c5c5983b9eb9bbaf3310b99ee5f0ef2980b
1 /* check resource: protocol for traversal problems */
3 const Cc = Components.classes;
4 const Ci = Components.interfaces;
5 const Cr = Components.results;
7 const specs = [
8 "resource:///chrome/../plugins",
9 "resource:///chrome%2f../plugins",
10 "resource:///chrome/..%2fplugins",
11 "resource:///chrome%2f%2e%2e%2fplugins",
12 "resource:///../../../..",
13 "resource:///..%2f..%2f..%2f..",
14 "resource:///%2e%2e"
17 function run_test() {
18 var ios = Cc["@mozilla.org/network/io-service;1"].
19 getService(Ci.nsIIOService);
21 for each (spec in specs) {
22 uri = ios.newURI(spec,null,null);
23 if (uri.spec.indexOf("..") != -1)
24 do_throw("resource: traversal remains: '"+spec+"' ==> '"+uri.spec+"'");