mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
more FILTER_SANITIZE_STRING fixes
This commit is contained in:
parent
956c2993ae
commit
66463ddff3
|
|
@ -366,9 +366,14 @@ trait PageLegacyTrait
|
|||
*/
|
||||
public function blueprintName(): string
|
||||
{
|
||||
$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