remove filter_input in favor of htmlspecialchars + strip_tags

This commit is contained in:
Andy Miller 2023-05-08 18:42:52 -06:00
parent 95ae35216a
commit 369c2e9ffa
No known key found for this signature in database
GPG Key ID: 9F2CF38AEBDB0AE0

View File

@ -1270,9 +1270,14 @@ class Page implements PageInterface
*/
public function blueprintName()
{
$blueprint_name = filter_input(INPUT_POST, 'blueprint', FILTER_SANITIZE_STRING) ?: $this->template();
if (!isset($_POST['blueprint'])) {
return $this->template();
}
return $blueprint_name;
$post_value = $_POST['blueprint'];
$sanitized_value = htmlspecialchars(strip_tags($post_value), ENT_QUOTES, 'UTF-8');
return $sanitized_value ?: $this->template();
}
/**