aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fcontest.php11
-rw-r--r--src/optionlower.php2
2 files changed, 7 insertions, 6 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");
diff --git a/src/optionlower.php b/src/optionlower.php
index b3f6055..92c309c 100644
--- a/src/optionlower.php
+++ b/src/optionlower.php
@@ -21,7 +21,7 @@
// todos os usuarios
require_once("globals.php");
-if(!ValidSession()) {
+if(!ValidSession()) { // || $_SESSION["usertable"]["usertype"] == 'team') {
InvalidSession("optionlower.php");
ForceLoad("index.php");
}