mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-04-29 02:34:05 -04:00
API: sanitize username
https://github.com/marienfressinaud/FreshRSS/issues/13
This commit is contained in:
@@ -124,7 +124,10 @@ function authorizationToUser() {
|
||||
if ($headerAuth != '') {
|
||||
$headerAuthX = explode('/', $headerAuth, 2);
|
||||
if ((count($headerAuthX) === 2) && ($headerAuthX[1] === TEMP_AUTH)) {
|
||||
return $headerAuthX[0];
|
||||
$user = $headerAuthX[0];
|
||||
if (ctype_alnum($user)) {
|
||||
return $user;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user