summaryrefslogtreecommitdiffstats
path: root/dom/security/test/general/file_toplevel_data_navigations.sjs
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-22 18:51:38 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-22 18:51:38 +0200
commit1b4c4256ee7705724b02919b4d432b2a391bcd04 (patch)
treeba2e9442b55afaa4288c096ae81ca64c8523b3c2 /dom/security/test/general/file_toplevel_data_navigations.sjs
parentc30ebdac27c93b57e368c69e9c13055a17229992 (diff)
downloadUXP-1b4c4256ee7705724b02919b4d432b2a391bcd04.tar
UXP-1b4c4256ee7705724b02919b4d432b2a391bcd04.tar.gz
UXP-1b4c4256ee7705724b02919b4d432b2a391bcd04.tar.lz
UXP-1b4c4256ee7705724b02919b4d432b2a391bcd04.tar.xz
UXP-1b4c4256ee7705724b02919b4d432b2a391bcd04.zip
moebius#223: Consider blocking top level window data: URIs (part 1/3 without tests)
https://github.com/MoonchildProductions/moebius/pull/223
Diffstat (limited to 'dom/security/test/general/file_toplevel_data_navigations.sjs')
-rw-r--r--dom/security/test/general/file_toplevel_data_navigations.sjs14
1 files changed, 14 insertions, 0 deletions
diff --git a/dom/security/test/general/file_toplevel_data_navigations.sjs b/dom/security/test/general/file_toplevel_data_navigations.sjs
new file mode 100644
index 000000000..501b833e5
--- /dev/null
+++ b/dom/security/test/general/file_toplevel_data_navigations.sjs
@@ -0,0 +1,14 @@
+// Custom *.sjs file specifically for the needs of Bug:
+// Bug 1394554 - Block toplevel data: URI navigations after redirect
+
+var DATA_URI =
+ "data:text/html,<body>toplevel data: URI navigations after redirect should be blocked</body>";
+
+function handleRequest(request, response)
+{
+ // avoid confusing cache behaviors
+ response.setHeader("Cache-Control", "no-cache", false);
+
+ response.setStatusLine("1.1", 302, "Found");
+ response.setHeader("Location", DATA_URI, false);
+}