X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/e32a48c6f4c05505465ed7fe3ca70cb703868d42..34eb26eb03c1d2915eccb43e3afdd7fdf7ebd0bf:/script.php diff --git a/script.php b/script.php index 99c5ec0..93599c9 100644 --- a/script.php +++ b/script.php @@ -218,6 +218,12 @@ if (has_error ()) if (isset ($_FILES['file']) && is_writable (VAR_FILES) && is_writable (VAR_LINKS)) { + if (!jirafeau_challenge_upload_ip ($cfg, $_SERVER['REMOTE_ADDR'])) + { + echo "Error"; + exit; + } + if (jirafeau_has_upload_password ($cfg) && (!isset ($_POST['upload_password']) || !jirafeau_challenge_upload_password ($cfg, $_POST['upload_password']))) @@ -505,6 +511,12 @@ fi /* Initialize an asynchronous upload. */ elseif (isset ($_GET['init_async'])) { + if (!jirafeau_challenge_upload_ip ($cfg, $_SERVER['REMOTE_ADDR'])) + { + echo "Error"; + exit; + } + if (jirafeau_has_upload_password ($cfg) && (!isset ($_POST['upload_password']) || !jirafeau_challenge_upload_password ($cfg, $_POST['upload_password'])))