mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-11 22:01:00 +00:00
@@ -20,6 +20,14 @@ if(isset($_GET['del_cookie'])) {
|
|||||||
if(!isset($_COOKIE['COOKUSR'])) {
|
if(!isset($_COOKIE['COOKUSR'])) {
|
||||||
$_COOKIE['COOKUSR'] = "";
|
$_COOKIE['COOKUSR'] = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( $_SERVER[ 'REQUEST_METHOD' ] == 'POST' ) {
|
||||||
|
if ( !isset( $_SESSION[ 'csrf' ] ) || $_SESSION[ 'csrf' ] !== $_POST[ 'csrf' ] )
|
||||||
|
throw new RuntimeException( 'CSRF attack' );
|
||||||
|
}
|
||||||
|
$key = sha1( microtime() );
|
||||||
|
$_SESSION[ 'csrf' ] = $key;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html>
|
<html>
|
||||||
@@ -213,6 +221,7 @@ CountBack(gsecs);
|
|||||||
?>
|
?>
|
||||||
<form method="post" name="snd" action="login.php">
|
<form method="post" name="snd" action="login.php">
|
||||||
<input type="hidden" name="ft" value="a4" />
|
<input type="hidden" name="ft" value="a4" />
|
||||||
|
<input type="hidden" name="csrf" value="<?php echo $key; ?>" />
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
Element.implement({
|
Element.implement({
|
||||||
//imgid: falls zu dem link ein pfeil geh?rt kann dieser "auf/zugeklappt" werden
|
//imgid: falls zu dem link ein pfeil geh?rt kann dieser "auf/zugeklappt" werden
|
||||||
|
|||||||
Reference in New Issue
Block a user