Suppression d'appels inutiles à checkcsrf

This commit is contained in:
Fred Tempez 2023-09-12 22:28:05 +02:00
parent 6af831a87c
commit 40b731d450
4 changed files with 1 additions and 29 deletions

View File

@ -808,15 +808,6 @@ class plugin extends common
} }
// Bouton d'importation des données d'un module spécifique // Bouton d'importation des données d'un module spécifique
if (count(explode('/', $this->getUrl())) === 6) { if (count(explode('/', $this->getUrl())) === 6) {
// Action interdite
if ($this->checkCSRF()) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'plugin',
'state' => false,
'notification' => helper::translate('Action interdite')
]);
}
// Traitement // Traitement

View File

@ -822,8 +822,7 @@ class theme extends common
{ {
// Action interdite // Action interdite
if ( if (
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true || $this->getUser('permission', __CLASS__, __FUNCTION__) !== true
$this->checkCSRF()
) { ) {
// Valeurs en sortie // Valeurs en sortie
// Valeurs en sortie // Valeurs en sortie

View File

@ -202,16 +202,6 @@ class user extends common
'access' => false 'access' => false
]); ]);
} }
// Action interdite
elseif (
$this->checkCSRF()
) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'user',
'notification' => helper::translate('Action interdite')
]);
}
// Bloque la suppression de son propre compte // Bloque la suppression de son propre compte
elseif ($this->getUser('id') === $this->getUrl(2)) { elseif ($this->getUser('id') === $this->getUrl(2)) {
// Valeurs en sortie // Valeurs en sortie

View File

@ -957,14 +957,6 @@ class gallery extends common
* Enregistre les options de configuration de la galerie d'images sélectionnée * Enregistre les options de configuration de la galerie d'images sélectionnée
*/ */
} elseif ($this->getUrl(2) === 'gallery') { } elseif ($this->getUrl(2) === 'gallery') {
// Action interdite
if ($this->checkCSRF()) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/edit',
'notification' => helper::translate('Action interdite')
]);
}
// Soumission du formulaire // Soumission du formulaire
if ( if (
$this->getUser('permission', __CLASS__, __FUNCTION__) === true && $this->getUser('permission', __CLASS__, __FUNCTION__) === true &&