mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
remove filter_input in favor of htmlspecialchars + strip_tags
This commit is contained in:
parent
95ae35216a
commit
369c2e9ffa
|
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user