Skip to content

Commit

Permalink
removing one of the FILTER_SANITIZE_STRING problems
Browse files Browse the repository at this point in the history
  • Loading branch information
twoln committed Mar 22, 2024
1 parent 6016b3c commit 8004851
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/common/Language.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private function setLang($hardSetLang = 0)
$langConverted[] = $_SESSION['language'];
}
if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
$langs = explode(",", filter_input(INPUT_SERVER, "HTTP_ACCEPT_LANGUAGE", FILTER_SANITIZE_STRING));
$langs = explode(",", htmlspecialchars(strip_tags($_SERVER['HTTP_ACCEPT_LANGUAGE'], ENT_QUOTES)));
foreach ($langs as $lang) {
$result = [];
preg_match("/(.*);+.*/", $lang, $result);
Expand Down

0 comments on commit 8004851

Please sign in to comment.