Skip to content

Commit

Permalink
Added proper escaping to the http_referer
Browse files Browse the repository at this point in the history
  • Loading branch information
effgarces committed Feb 11, 2022
1 parent 77e9bba commit bed96d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Pages/Page.php
Expand Up @@ -170,7 +170,7 @@ public function RedirectToError($errorMessageId = ErrorMessages::UNKNOWN_ERROR,

public function GetLastPage($defaultPage = '')
{
$referer = getenv("HTTP_REFERER");
$referer = filter_var(getenv("HTTP_REFERER"), FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if (empty($referer)) {
return empty($defaultPage) ? Pages::LOGIN : $defaultPage;
}
Expand Down

0 comments on commit bed96d1

Please sign in to comment.