From f0efc1e52f04b73d3300271c41fa597894be674f Mon Sep 17 00:00:00 2001 From: thaaoblues Date: Mon, 9 Sep 2024 20:40:24 +0200 Subject: [PATCH] uiui --- bdd.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bdd.php b/bdd.php index 0e558e9..16fcae7 100644 --- a/bdd.php +++ b/bdd.php @@ -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; }