diff options
| author | cassio <cassiopc@gmail.com> | 2018-11-08 15:11:19 +0000 |
|---|---|---|
| committer | cassio <cassiopc@gmail.com> | 2018-11-08 15:11:19 +0000 |
| commit | f74c0fdddbdb768a2ec50e9a9f165887cc6f51e1 (patch) | |
| tree | 9b5191077f1a944f44232d1f5cc4e08f078a6668 /src/index.php | |
| parent | 336e0c032cc0f9e9547853f814ebffdfd00c5e2d (diff) | |
| download | boca-f74c0fdddbdb768a2ec50e9a9f165887cc6f51e1.tar.gz boca-f74c0fdddbdb768a2ec50e9a9f165887cc6f51e1.zip | |
fix score, submissions and cookies
Diffstat (limited to 'src/index.php')
| -rw-r--r-- | src/index.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/index.php b/src/index.php index 7b162bd..7bdbb81 100644 --- a/src/index.php +++ b/src/index.php @@ -49,6 +49,19 @@ if(isset($_GET["getsessionid"])) { echo session_id(); exit; } + +$coo = array(); +if(isset($_COOKIE['biscoitobocabombonera'])) { + $coo = explode('-',$_COOKIE['biscoitobocabombonera']); + if(count($coo) != 2 || + strlen($coo[1])!=strlen(myhash('xxx')) || + !is_numeric($coo[0]) || + !ctype_alnum($coo[1])) + $coo = array(); +} +if(count($coo) != 2) + setcookie('biscoitobocabombonera',time() . '-' . myhash(time() . rand() . time() . rand()),time() + 240*3600); + ob_end_flush(); require_once('version.php'); |