diff --git a/core/module/page/page.php b/core/module/page/page.php index f9f81e4d..a4e12f45 100644 --- a/core/module/page/page.php +++ b/core/module/page/page.php @@ -79,7 +79,7 @@ class page extends common $this->addOutput([ 'access' => false ]); - } // Jeton incorrect + } // Action interdite elseif ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ @@ -187,7 +187,7 @@ class page extends common $this->addOutput([ 'access' => false ]); - } // Jeton incorrect + } // Action interdite elseif ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ diff --git a/core/module/plugin/plugin.php b/core/module/plugin/plugin.php index 106ca1b7..04cd8b1a 100644 --- a/core/module/plugin/plugin.php +++ b/core/module/plugin/plugin.php @@ -62,8 +62,8 @@ class plugin extends common public function delete() { - // Jeton incorrect - if ($this->getUrl(3) !== $_SESSION['csrf']) { + // Action interdite + if ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ 'redirect' => helper::baseUrl() . 'plugin', @@ -291,8 +291,8 @@ class plugin extends common */ public function uploadItem() { - // Jeton incorrect - if ($this->getUrl(3) !== $_SESSION['csrf']) { + // Action interdite + if ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ 'redirect' => helper::baseUrl() . 'store', @@ -383,7 +383,7 @@ class plugin extends common implode(' - ', $pageInfos), template::button('moduleExport' . $key, [ 'class' => $class, - 'href' => helper::baseUrl() . $this->getUrl(0) . '/uploadItem/' . $key , + 'href' => helper::baseUrl() . $this->getUrl(0) . '/uploadItem/' . $key, 'value' => $ico, 'help' => $help ]) @@ -454,7 +454,6 @@ class plugin extends common $pagesInfos[$keyi18n][$key]['moduleId'] = $value; } } - } // Recherche des modules orphelins dans toutes les langues @@ -482,7 +481,7 @@ class plugin extends common $infoModules[$key]['delete'] === true ? template::button('moduleDelete' . $key, [ 'class' => 'moduleDelete buttonRed', - 'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/' . $key , + 'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/' . $key, 'value' => template::ico('trash'), 'help' => 'Supprimer le module' ]) @@ -503,12 +502,12 @@ class plugin extends common $infoModules[$key]['version'], '', template::button('moduleSave' . $key, [ - 'href' => helper::baseUrl() . $this->getUrl(0) . '/save/filemanager/' . $key , + 'href' => helper::baseUrl() . $this->getUrl(0) . '/save/filemanager/' . $key, 'value' => template::ico('download-cloud'), 'help' => 'Sauvegarder le module dans le gestionnaire de fichiers' ]), template::button('moduleDownload' . $key, [ - 'href' => helper::baseUrl() . $this->getUrl(0) . '/save/download/' . $key , + 'href' => helper::baseUrl() . $this->getUrl(0) . '/save/download/' . $key, 'value' => template::ico('download'), 'help' => 'Sauvegarder et télécharger le module' ]) @@ -534,19 +533,19 @@ class plugin extends common $infoModules[$pagesInfos[$keyi18n][$keyPage]['moduleId']]['version'], template::flag($keyi18n, '20px') . ' ' . $pagesInfos[$keyi18n][$keyPage]['title'] . ' (' . $keyPage . ')', template::button('dataExport' . $keyPage, [ - 'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/filemanager/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage , + 'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/filemanager/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage, // appel de fonction vaut exécution, utiliser un paramètre 'value' => template::ico('download-cloud'), 'help' => 'Sauvegarder les données du module dans le gestionnaire de fichiers' ]), template::button('dataExport' . $keyPage, [ - 'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/download/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage , + 'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/download/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage, // appel de fonction vaut exécution, utiliser un paramètre 'value' => template::ico('download'), 'help' => 'Sauvegarder et télécharger les données du module' ]), template::button('dataDelete' . $keyPage, [ - 'href' => helper::baseUrl() . $this->getUrl(0) . '/dataDelete/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage , + 'href' => helper::baseUrl() . $this->getUrl(0) . '/dataDelete/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage, // appel de fonction vaut exécution, utiliser un paramètre 'value' => template::ico('trash'), 'class' => 'buttonRed dataDelete', @@ -572,8 +571,8 @@ class plugin extends common */ public function save() { - // Jeton incorrect - if ($this->getUrl(4) !== $_SESSION['csrf']) { + // Action interdite + if ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ 'redirect' => helper::baseUrl() . 'plugin', @@ -646,8 +645,8 @@ class plugin extends common */ public function dataDelete() { - // Jeton incorrect - if ($this->getUrl(5) !== $_SESSION['csrf']) { + // Action interdite + if ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ 'redirect' => helper::baseUrl() . 'plugin', @@ -677,8 +676,8 @@ class plugin extends common */ public function dataExport() { - // Jeton incorrect - if ($this->getUrl(6) !== $_SESSION['csrf']) { + // Action interdite + if ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ 'redirect' => helper::baseUrl() . 'plugin', @@ -818,8 +817,8 @@ class plugin extends common } // Bouton d'importation des données d'un module spécifique if (count(explode('/', $this->getUrl())) === 6) { - // Jeton incorrect - if ($this->getUrl(3) !== $_SESSION['csrf']) { + // Action interdite + if ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ 'redirect' => helper::baseUrl() . 'plugin', diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 12132a8f..46eb4598 100644 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -796,7 +796,7 @@ class theme extends common */ public function fontDelete() { - // Jeton incorrect + // Action interdite if ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ diff --git a/core/module/translate/translate.php b/core/module/translate/translate.php index c1bd86ae..206b1294 100644 --- a/core/module/translate/translate.php +++ b/core/module/translate/translate.php @@ -67,7 +67,7 @@ class translate extends common public function update() { $lang = $this->getUrl(2); - // Jeton incorrect ou URl avec le code langue incorrecte + // Action interdite ou URl avec le code langue incorrecte if ( array_key_exists($lang, self::$languages) === false ) { @@ -364,7 +364,7 @@ class translate extends common */ public function locale() { - // Jeton incorrect ou URl avec le code langue incorrecte + // Action interdite ou URl avec le code langue incorrecte $lang = $this->getUrl(2); if ( array_key_exists($lang, self::$languages) === false @@ -469,7 +469,7 @@ class translate extends common public function edit() { $lang = $this->getUrl(2); - // Jeton incorrect ou URl avec le code langue incorrecte + // Action interdite ou URl avec le code langue incorrecte if ( array_key_exists($lang, self::$languages) === false ) { @@ -558,7 +558,7 @@ class translate extends common */ public function delete() { - // Jeton incorrect ou URl avec le code langue incorrecte + // Action interdite ou URl avec le code langue incorrecte $target = $this->getUrl(2); $lang = $this->getUrl(3); if ( @@ -613,7 +613,7 @@ class translate extends common */ public function default() { - // Jeton incorrect ou URl avec le code langue incorrecte + // Action interdite ou URl avec le code langue incorrecte $lang = $this->getUrl(2); if ( array_key_exists($lang, self::$languages) === false diff --git a/core/module/user/user.php b/core/module/user/user.php index 433c38bd..b2764924 100644 --- a/core/module/user/user.php +++ b/core/module/user/user.php @@ -156,14 +156,14 @@ class user extends common 'access' => false ]); } - // Jeton incorrect + // Action interdite elseif ( $this->checkCSRF() ) { // Valeurs en sortie $this->addOutput([ 'redirect' => helper::baseUrl() . 'user', - 'notification' => helper::translate('Jeton incorrect') + 'notification' => helper::translate('Action interdite') ]); } // Bloque la suppression de son propre compte diff --git a/module/blog/blog.php b/module/blog/blog.php index 82116cce..08632e8d 100755 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -378,7 +378,7 @@ class blog extends common 'access' => false ]); } - // Jeton incorrect + // Action interdite elseif ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ @@ -403,7 +403,7 @@ class blog extends common */ public function commentDeleteAll() { - // Jeton incorrect + // Action interdite if ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ @@ -435,7 +435,7 @@ class blog extends common 'access' => false ]); } - // Jeton incorrect + // Action interdite elseif ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ @@ -599,7 +599,7 @@ class blog extends common 'access' => false ]); } - // Jeton incorrect + // Action interdite elseif ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ @@ -624,7 +624,7 @@ class blog extends common */ public function edit() { - // Jeton incorrect + // Action interdite if ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ diff --git a/module/form/form.php b/module/form/form.php index 57fb9792..667db5a9 100644 --- a/module/form/form.php +++ b/module/form/form.php @@ -266,7 +266,7 @@ class form extends common */ public function export2csv() { - // Jeton incorrect + // Action interdite if ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ @@ -307,7 +307,7 @@ class form extends common */ public function deleteall() { - // Jeton incorrect + // Action interdite if ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ @@ -343,7 +343,7 @@ class form extends common */ public function delete() { - // Jeton incorrect + // Action interdite if ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index 21ce91dc..88f1d70c 100644 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -506,7 +506,7 @@ class gallery extends common 'access' => false ]); } - // Jeton incorrect + // Action interdite if ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ @@ -543,7 +543,7 @@ class gallery extends common */ public function edit() { - // Jeton incorrect + // Action interdite if ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ @@ -853,7 +853,7 @@ class gallery extends common */ public function theme() { - // Jeton incorrect + // Action interdite if ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ @@ -934,7 +934,7 @@ class gallery extends common * Options applicables à toutes les galeries du module */ if ($this->getUrl(2) === 'galleries') { - // Jeton incorrect + // Action interdite if ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ @@ -975,7 +975,7 @@ class gallery extends common * Enregistre les options de configuration de la galerie d'images sélectionnée */ } elseif ($this->getUrl(2) === 'gallery') { - // Jeton incorrect + // Action interdite if ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ diff --git a/module/news/news.php b/module/news/news.php index e6a0d2e5..31e4fdcc 100644 --- a/module/news/news.php +++ b/module/news/news.php @@ -371,7 +371,7 @@ class news extends common 'access' => false ]); } - // Jeton incorrect + // Action interdite elseif ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([ @@ -396,7 +396,7 @@ class news extends common */ public function edit() { - // Jeton incorrect + // Action interdite if ($this->checkCSRF()) { // Valeurs en sortie $this->addOutput([