From 43b084369e3455174c212da5bd5ce1e4f7d07b99 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Tue, 20 Jun 2023 20:19:19 +0200 Subject: [PATCH] Csrf Translate --- core/module/translate/translate.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/module/translate/translate.php b/core/module/translate/translate.php index 714c5bb1..c1bd86ae 100644 --- a/core/module/translate/translate.php +++ b/core/module/translate/translate.php @@ -69,7 +69,6 @@ class translate extends common $lang = $this->getUrl(2); // Jeton incorrect ou URl avec le code langue incorrecte if ( - $this->getUrl(3) !== $_SESSION['csrf'] && array_key_exists($lang, self::$languages) === false ) { // Valeurs en sortie @@ -563,8 +562,7 @@ class translate extends common $target = $this->getUrl(2); $lang = $this->getUrl(3); if ( - $this->getUrl(4) !== $_SESSION['csrf'] - || array_key_exists($lang, self::$languages) === false + array_key_exists($lang, self::$languages) === false ) { // Valeurs en sortie $this->addOutput([ @@ -618,8 +616,7 @@ class translate extends common // Jeton incorrect ou URl avec le code langue incorrecte $lang = $this->getUrl(2); if ( - $this->getUrl(3) !== $_SESSION['csrf'] - || array_key_exists($lang, self::$languages) === false + array_key_exists($lang, self::$languages) === false ) { // Valeurs en sortie $this->addOutput([