mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
r437
Защита от открытия сайта во фрейме и последующего увода паролей. Спасибо rutracker.org за идею. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@437 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
0cac51a124
commit
23397268a0
2 changed files with 13 additions and 2 deletions
|
@ -56,8 +56,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
|
|||
|
||||
// Increase number of revision after update
|
||||
$bb_cfg['tp_version'] = '2.5 Beta';
|
||||
$bb_cfg['tp_release_state'] = 'R436';
|
||||
$bb_cfg['tp_release_date'] = '27-06-2012';
|
||||
$bb_cfg['tp_release_state'] = 'R437';
|
||||
$bb_cfg['tp_release_date'] = '01-07-2012';
|
||||
|
||||
// Database
|
||||
$charset = 'utf8';
|
||||
|
|
|
@ -307,6 +307,17 @@ function go_to_page ()
|
|||
<!-- ELSE -->
|
||||
<!--======-->
|
||||
|
||||
<script type="text/javascript">
|
||||
if (top != self) {
|
||||
allowed_self = /^(translate\.googleusercontent\.com)$/;
|
||||
if (!self.location.hostname.match(allowed_self)) {
|
||||
$(function(){
|
||||
$('body').html('<center><h1><br /><br />Похоже вас пытаются обмануть<br />Сайт '+ self.location.hostname +' открыт во фрейме</h1></center>');
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!--page_container-->
|
||||
<div id="page_container">
|
||||
<a name="top"></a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue