This commit is contained in:
thaaoblues 2024-09-09 20:40:24 +02:00
parent da1b253679
commit f0efc1e52f

View file

@ -109,7 +109,8 @@ function saveFilesFromPost($postData,$id_ensemble) {
// Extract file information
if (isset($file['name'])){
$fileName = htmlspecialchars($file['name']);
if(!check_ext($fileName) || $safe_type == 0){
// le dernier check est pour autoriser l'upload de fichiers html aux admins
if(!check_ext($fileName) || $safe_type == 0 || ($safe_type == 4 && !$_SESSION["admin"])){
echo(json_encode(["status"=>"0","msg"=>"le fichier '$fileName' n'a pas passé les filtres de contenu. ( dommaaaaggee :c )"]));
exit;
}