phpmyadmin/js/cross_framing_protection.js
Michal Čihař 24d0eb5520 Improved protection against cross framing
We now include CSS to hide the page and display it conditionally after
checking we're in top frame. This adds extra protection for clients who
do not support X-Frame-Options.

See also http://en.wikipedia.org/wiki/Framekiller and
https://www.owasp.org/index.php/Clickjacking_Defense_Cheat_Sheet
2013-07-29 14:55:29 +02:00

10 lines
221 B
JavaScript

/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Conditionally included if framing is not allowed
*/
if(self == top) {
document.documentElement.style.display = 'block' ;
} else {
top.location = self.location ;
}