aboutsummaryrefslogtreecommitdiff
path: root/src/index.php
diff options
context:
space:
mode:
authorcassio <cassiopc@gmail.com>2018-11-08 15:11:19 +0000
committercassio <cassiopc@gmail.com>2018-11-08 15:11:19 +0000
commitf74c0fdddbdb768a2ec50e9a9f165887cc6f51e1 (patch)
tree9b5191077f1a944f44232d1f5cc4e08f078a6668 /src/index.php
parent336e0c032cc0f9e9547853f814ebffdfd00c5e2d (diff)
downloadboca-f74c0fdddbdb768a2ec50e9a9f165887cc6f51e1.tar.gz
boca-f74c0fdddbdb768a2ec50e9a9f165887cc6f51e1.zip
fix score, submissions and cookies
Diffstat (limited to 'src/index.php')
-rw-r--r--src/index.php13
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');