Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorMichal Čihař <mcihar@suse.cz>2013-07-29 12:58:15 +0400
committerMichal Čihař <mcihar@suse.cz>2013-07-29 16:55:22 +0400
commit240b8332db53dedc27baeec5306dabad3bdece3b (patch)
tree60084be1fad223ab724a317071cda21c08ae01c0 /js
parent52b9b6c81f6e62858c9e3d495925d5e2ab65ff75 (diff)
Readd AllowThirdPartyFraming option
We want by default no framing of phpMyAdmin, but still some sites might need to embed it, so configuration option (with appropriate security warning) is there. This basically reverts d7e0bed28443e6cf8f41965cc2f27be19c667fa6.
Diffstat (limited to 'js')
-rw-r--r--js/cross_framing_protection.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/js/cross_framing_protection.js b/js/cross_framing_protection.js
new file mode 100644
index 0000000000..6fb780350f
--- /dev/null
+++ b/js/cross_framing_protection.js
@@ -0,0 +1,14 @@
+/* vim: set expandtab sw=4 ts=4 sts=4: */
+/**
+ * Conditionally included if third-party framing is not allowed
+ *
+ */
+
+try {
+ if (top != self) {
+ top.location.href = self.location.href;
+ }
+} catch(e) {
+ alert("Redirecting... (error: " + e);
+ top.location.href = self.location.href;
+}