aboutsummaryrefslogtreecommitdiff
path: root/src/flog.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/flog.php
parent336e0c032cc0f9e9547853f814ebffdfd00c5e2d (diff)
downloadboca-f74c0fdddbdb768a2ec50e9a9f165887cc6f51e1.tar.gz
boca-f74c0fdddbdb768a2ec50e9a9f165887cc6f51e1.zip
fix score, submissions and cookies
Diffstat (limited to 'src/flog.php')
-rw-r--r--src/flog.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/flog.php b/src/flog.php
index 1e6e6cb..9ff6357 100644
--- a/src/flog.php
+++ b/src/flog.php
@@ -187,8 +187,14 @@ function DBLogInContest($name,$pass,$contest,$msg=true) {
if($a["usertype"] == "team")
@file_put_contents($dircode, $ccode);
}
-
+
$gip=getIP();
+ if(!ValidCookie(true,$gip)) {
+ if($msg) MSGError("Invalid computer (4).");
+ unset($_SESSION["usertable"]);
+ return false;
+ }
+
if ($a["userip"] != $gip && $a["userip"] != "" && $a["usertype"] != "score") {
LOGLevel("User $name is using two different IPs: " . $a["userip"] .
"(" . dateconv($a["userlastlogin"]) .") and " . $gip,1);