From ff31d42ac2d00d6df71d08a461a813d2ad4019c9 Mon Sep 17 00:00:00 2001 From: cassio Date: Fri, 13 Sep 2013 01:04:46 +0200 Subject: fixed bug to use some certain passwords (they simply didnt work because of hexdec calculation error) --- src/fcontest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/fcontest.php') 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"); -- cgit v1.2.3