Browse Source

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 năm trước cách đây
mục cha
commit
4ac80c50e3
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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);
     $key = OneTimePadEncrypt($secretkey, $onetimepad);
     session_register('onetimepad');
     session_register('onetimepad');
 
 
+    /* remove redundant spaces */
+    $login_username = trim($login_username);
+
     /* Verify that username and password are correct. */
     /* Verify that username and password are correct. */
     if ($force_username_lowercase) {
     if ($force_username_lowercase) {
         $login_username = strtolower($login_username);
         $login_username = strtolower($login_username);