Fix: Sanitizer toutes les valeurs passées aux formulaires

Refs: spip-team/securite#4839
(cherry picked from commit bbd88bd24a25e4e4aa9b0d12ff0124df8df9c4f1)
(cherry picked from commit 0d4a43f8bc)
pull/5511/head
Cerdic 3 months ago
parent 9394e2f048
commit 5aedf49b89

@ -37,8 +37,7 @@ function protege_champ($texte) {
if (is_array($texte)) {
$texte = array_map('protege_champ', $texte);
} else {
// ne pas corrompre une valeur serialize
if ((preg_match(",^[abis]:\d+[:;],", $texte) and @unserialize($texte) != false) or is_null($texte)) {
if (is_null($texte)) {
return $texte;
}
if (is_string($texte)

Loading…
Cancel
Save