aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcassio <cassiopc@gmail.com>2013-09-12 23:04:46 +0000
committercassio <cassiopc@gmail.com>2013-09-12 23:04:46 +0000
commitff31d42ac2d00d6df71d08a461a813d2ad4019c9 (patch)
tree2c127e2b38175b864be086dadd50f814e0ccd67e /src
parent404017540f209393d0f7e732f9a19e37458037ad (diff)
downloadboca-ff31d42ac2d00d6df71d08a461a813d2ad4019c9.tar.gz
boca-ff31d42ac2d00d6df71d08a461a813d2ad4019c9.zip
fixed bug to use some certain passwords (they simply didnt work because of hexdec calculation error)
Diffstat (limited to 'src')
-rw-r--r--src/fcontest.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fcontest.php b/src/fcontest.php
index 313cf82..d927529 100644
--- a/src/fcontest.php
+++ b/src/fcontest.php
@@ -1094,7 +1094,10 @@ function DBUserUpdate($contest, $site, $user, $username, $userfull, $userdesc, $
else $temp = $a["userpassword"];
$lentmp = strlen($temp);
$temp = bighexsub($passn, $temp);
- $newpass = substr($temp, strlen($temp)-$lentmp);
+ if($lentmp > strlen($temp))
+ $newpass = '0' . $temp;
+ else
+ $newpass = substr($temp, strlen($temp)-$lentmp);
$c = DBConnect();
DBExec($c, "begin work");