summaryrefslogtreecommitdiff
path: root/useradm.php
diff options
context:
space:
mode:
Diffstat (limited to 'useradm.php')
-rw-r--r--useradm.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/useradm.php b/useradm.php
index d36167a..ee330cb 100644
--- a/useradm.php
+++ b/useradm.php
@@ -44,8 +44,8 @@
exit;
}
- $user = SQLite3::escapeString($user);
- $pass_hash = SQLite3::escapeString('SHA256:' . hash('sha256', "$user:$pass"));
+ $user = SQLite3::escapeString(trim(mb_strtolower($user)));
+ $pass_hash = SQLite3::escapeString('SHA256:' . hash('sha256', "$user:" . trim($pass)));
print "Adding user $user with password $pass...\n";