浏览代码

Remove redundant spaces around the login.. this prevents prefs files like "thijs .pref" to be created.
Can't think what would be broken by this but please report/fix if so.

Thijs Kinkhorst 23 年之前
父节点
当前提交
4ac80c50e3
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/redirect.php

+ 3 - 0
src/redirect.php

@@ -77,6 +77,9 @@ if (!session_is_registered('user_is_logged_in')) {
     $key = OneTimePadEncrypt($secretkey, $onetimepad);
     session_register('onetimepad');
 
+    /* remove redundant spaces */
+    $login_username = trim($login_username);
+
     /* Verify that username and password are correct. */
     if ($force_username_lowercase) {
         $login_username = strtolower($login_username);