Skip to content

Commit

Permalink
Trim username on login
Browse files Browse the repository at this point in the history
When an LDAP user adds spaces before or after their username when
logging in, they will be authenticated successfully and logged in, but
Mantis will create a new entry in the user table including the spaces.

Fixes #25097
  • Loading branch information
dregad committed Feb 17, 2020
1 parent 293d425 commit 73fc958
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion login_password_page.php
Expand Up @@ -58,7 +58,7 @@
$f_error = gpc_get_bool( 'error' );
$f_cookie_error = gpc_get_bool( 'cookie_error' );
$f_return = string_sanitize_url( gpc_get_string( 'return', '' ) );
$f_username = gpc_get_string( 'username', '' );
$f_username = trim( gpc_get_string( 'username', '' ) );
$f_reauthenticate = gpc_get_bool( 'reauthenticate', false );
$f_perm_login = gpc_get_bool( 'perm_login', false );
$f_secure_session = gpc_get_bool( 'secure_session', false );
Expand Down

0 comments on commit 73fc958

Please sign in to comment.