forked from ZwiiCMS-Team/ZwiiCMS
Fix sécurité profil filmaanager path empty
This commit is contained in:
parent
34aa4f4c25
commit
961fcb2ecd
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
## Version 13.0.04
|
## Version 13.0.04
|
||||||
# Corrections
|
# Corrections
|
||||||
|
- Corrige un bug de sécurité. Lorsqu'un profil dispose des droits d'accès au gestionnaire de fichiers et qu'aucun dossier est sélectionné, la racine du site était affichée.
|
||||||
- Erreur d'édition d'un profil de niveau 1, exemple membre simple.
|
- Erreur d'édition d'un profil de niveau 1, exemple membre simple.
|
||||||
- Le profil de membre simple affichait le gestionnaire de fichiers dans tous les cas.
|
- Le profil de membre simple affichait le gestionnaire de fichiers dans tous les cas.
|
||||||
- Importation d'utilisateurs en masse, le bouton de téléchargement d'un modèle était inopérant.
|
- Importation d'utilisateurs en masse, le bouton de téléchargement d'un modèle était inopérant.
|
||||||
|
@ -542,17 +542,25 @@ class user extends common
|
|||||||
// Les profils 1 sont désactivés dans le formulaire
|
// Les profils 1 sont désactivés dans le formulaire
|
||||||
$profil = empty($this->getInput('profilEditProfil')) ? '1' : $this->getInput('profilEditProfil') ;
|
$profil = empty($this->getInput('profilEditProfil')) ? '1' : $this->getInput('profilEditProfil') ;
|
||||||
$oldProfil = $this->getInput('profilEditOldProfil', helper::FILTER_STRING_SHORT);
|
$oldProfil = $this->getInput('profilEditOldProfil', helper::FILTER_STRING_SHORT);
|
||||||
|
// Gère le chemin
|
||||||
|
$fileManager = $this->getInput('profilEditFileManager', helper::FILTER_BOOLEAN);
|
||||||
|
$path = $this->getInput('profilEditPath');
|
||||||
|
if ($group <= self::GROUP_ADMIN
|
||||||
|
&& $fileManager
|
||||||
|
&& empty($path)
|
||||||
|
) {
|
||||||
|
$fileManager = false;
|
||||||
|
}
|
||||||
if ($profil !== $profil) {
|
if ($profil !== $profil) {
|
||||||
$this->deleteData(['profil', $group, $oldProfil]);
|
$this->deleteData(['profil', $group, $oldProfil]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Données du formulaire
|
// Données du formulaire
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->getInput('profilEditName', helper::FILTER_STRING_SHORT, true),
|
'name' => $this->getInput('profilEditName', helper::FILTER_STRING_SHORT, true),
|
||||||
'readonly' => false,
|
'readonly' => false,
|
||||||
'permanent' => $group === '1' ? true : false,
|
'permanent' => $group === '1' ? true : false,
|
||||||
'comment' => $this->getInput('profilEditComment', helper::FILTER_STRING_SHORT, true),
|
'comment' => $this->getInput('profilEditComment', helper::FILTER_STRING_SHORT, true),
|
||||||
'filemanager' => $this->getInput('profilEditFileManager', helper::FILTER_BOOLEAN),
|
'filemanager' => $fileManager,
|
||||||
'file' => [
|
'file' => [
|
||||||
'download' => $this->getInput('profilEditDownload', helper::FILTER_BOOLEAN),
|
'download' => $this->getInput('profilEditDownload', helper::FILTER_BOOLEAN),
|
||||||
'edit' => $this->getInput('profilEditEdit', helper::FILTER_BOOLEAN),
|
'edit' => $this->getInput('profilEditEdit', helper::FILTER_BOOLEAN),
|
||||||
@ -572,7 +580,7 @@ class user extends common
|
|||||||
'rename' => $this->getInput('profilEditFolderRename', helper::FILTER_BOOLEAN),
|
'rename' => $this->getInput('profilEditFolderRename', helper::FILTER_BOOLEAN),
|
||||||
'copycut' => $this->getInput('profilEditFolderCopycut', helper::FILTER_BOOLEAN),
|
'copycut' => $this->getInput('profilEditFolderCopycut', helper::FILTER_BOOLEAN),
|
||||||
'chmod' => $this->getInput('profilEditFolderChmod', helper::FILTER_BOOLEAN),
|
'chmod' => $this->getInput('profilEditFolderChmod', helper::FILTER_BOOLEAN),
|
||||||
'path' => $this->getInput('profilEditPath'),
|
'path' => $path,
|
||||||
],
|
],
|
||||||
'page' => [
|
'page' => [
|
||||||
'add' => $this->getInput('profilEditPageAdd', helper::FILTER_BOOLEAN),
|
'add' => $this->getInput('profilEditPageAdd', helper::FILTER_BOOLEAN),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user