From: Patrick Canterino Date: Sat, 9 Aug 2025 13:35:46 +0000 (+0200) Subject: Trying to upload a file using script.php with an upload password set always ends... X-Git-Tag: 4.7.0~7^2 X-Git-Url: https://git.p6c8.net/jirafeau/pcanterino.git/commitdiff_plain/f13207503ad0262c4fba3f5cb47d01dcf73f71c5 Trying to upload a file using script.php with an upload password set always ends up in an "Error 2". Added "!isset($_POST['upload_password'])" to the test condition. Patch by Yannis Aribaud --- diff --git a/script.php b/script.php index aa8c259..ae57449 100644 --- a/script.php +++ b/script.php @@ -74,7 +74,7 @@ if (isset($_FILES['file']) && is_writable(VAR_FILES) !jirafeau_challenge_upload($cfg, get_ip_address($cfg), $_POST['upload_password'])) { echo 'Error 3: Invalid password'; exit; - } elseif (!jirafeau_challenge_upload($cfg, get_ip_address($cfg), null)) { + } elseif (!isset($_POST['upload_password']) && !jirafeau_challenge_upload($cfg, get_ip_address($cfg), null)) { echo 'Error 2: No password nor allowed IP'; exit; }