diff options
| author | Cassio de Campos <cassiopc@gmail.com> | 2017-10-26 08:05:05 +0000 |
|---|---|---|
| committer | Cassio de Campos <cassiopc@gmail.com> | 2017-10-26 08:05:05 +0000 |
| commit | 907334bbf19a01e46f58b999c2787c61aea3943e (patch) | |
| tree | 5b62fbcfeafc869699e42cab8d4fd119a212d266 /src/fcontest.php | |
| parent | 499ba9eba88be6bad972ee748e7389bd4f0dfa7e (diff) | |
| download | boca-907334bbf19a01e46f58b999c2787c61aea3943e.tar.gz boca-907334bbf19a01e46f58b999c2787c61aea3943e.zip | |
bug in pass change for teams
Diffstat (limited to 'src/fcontest.php')
| -rw-r--r-- | src/fcontest.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/fcontest.php b/src/fcontest.php index f8f2cff..dc8a6d7 100644 --- a/src/fcontest.php +++ b/src/fcontest.php @@ -1179,11 +1179,12 @@ function DBUserUpdate($contest, $site, $user, $username, $userfull, $userdesc, $ else $temp = $a["userpassword"]; $lentmp = strlen($temp); $temp = bighexsub($passn, $temp); - if($lentmp > strlen($temp)) - $newpass = '0' . $temp; - else - $newpass = substr($temp, strlen($temp)-$lentmp); - + if($lentmp > strlen($temp)) { + $newpass = '0' . $temp; + while(strlen($newpass) < $lentmp) $newpass = '0' . $newpass; + } else { + $newpass = substr($temp, strlen($temp)-$lentmp); + } $c = DBConnect(); DBExec($c, "begin work"); DBExec($c, "lock table usertable"); |