diff --git a/public/index.php b/public/index.php index 746f1247ea2bfd0effab5c9f098371b08e19afe7..208b1855a16cd02919aed897ae95beb2f0b99478 100755 --- a/public/index.php +++ b/public/index.php @@ -63,7 +63,7 @@ if ( isset($_POST["username"]) && isset($_POST["password"]) && !$RATELIMITED ) { require("../lib/ldap-auth/ldap-auth.php"); $isAuthd = ldapAuth($_POST["username"], $_POST["password"]); - $username = $_POST["username"]; + $username = strtolower($_POST['username']); if ($isAuthd == "sucs"){ //do stuff for sucs auth @@ -93,7 +93,7 @@ if ( isset($_POST["username"]) && isset($_POST["password"]) && !$RATELIMITED ) { // connect to the sucssite db to get the username of the session $db_connection = pg_connect("dbname=sucssite"); - $username = pg_fetch_result(pg_query_params($db_connection, "SELECT * FROM session WHERE hash=$1", array($legacySessionID)), 0, "username"); + $username = strtolower(pg_fetch_result(pg_query_params($db_connection, "SELECT * FROM session WHERE hash=$1", array($legacySessionID)), 0, "username")); if ($username !== null && $username !== false) { // we have a vlid username from a old session