Skip to content

Commit bcba3ac

Browse files
committed
added check for char |
1 parent a239120 commit bcba3ac

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

includes/SSO_Helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ public static function handleLogin( $token ) {
260260

261261
$user = self::getUserFromToken( $token );
262262
if ( $user ) {
263-
if ( preg_match( "/['\"\\\\]/", $user->user_login ) ) {
263+
if ( preg_match( "/['\"\\\\<|]/", $user->user_login ) ) {
264264
self::triggerFailure( 'invalid_username' );
265265
exit;
266266
}

includes/SSO_Helpers_Legacy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static function handleLegacyLogin( $nonce, $salt ) {
3939
}
4040

4141
if ( $user ) {
42-
if ( preg_match( "/['\"\\\\<]/", $user->user_login ) ) {
42+
if ( preg_match( "/['\"\\\\<|]/", $user->user_login ) ) {
4343
self::triggerFailure( 'invalid_username' );
4444
exit;
4545
}

0 commit comments

Comments
 (0)