Skip to content

Commit

Permalink
relax regexp for input validation on userids
Browse files Browse the repository at this point in the history
  • Loading branch information
joostd committed Oct 2, 2015
1 parent 4f6757a commit 6514a71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion www/tiqr/tiqr.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function register( $enrollmentSecret, $secret, $notificationType, $notificationA
break;
case "login":
$sessionKey = preg_replace("/[^a-zA-Z0-9]+/", "", $_POST['sessionKey']);
$userId = preg_replace("/[^a-zA-Z0-9]+/", "", $_POST['userId']);
$userId = preg_replace("/[^a-zA-Z0-9_-]+/", "", $_POST['userId']);
$response = preg_replace("/[^a-zA-Z0-9]+/", "", $_POST['response']);
logger()->addInfo(sprintf("received authentication response (%s) from user '%s' for session '%s'", $response, $userId, $sessionKey));
$result = login( $sessionKey, $userId, $response );
Expand Down

0 comments on commit 6514a71

Please sign in to comment.