X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/ecfc8a70b8f33915e53ef2fc9ab14e77daa96e72..b7cba998a553a2c2050a44161c08e2cdb507b514:/script.php?ds=sidebyside diff --git a/script.php b/script.php index 5fe60e2..105023f 100644 --- a/script.php +++ b/script.php @@ -126,6 +126,12 @@ if (isset($_FILES['file']) && is_writable(VAR_FILES) exit; } + // Check if one time download is enabled + if (!$cfg['one_time_download'] && isset($_POST['one_time_download'])) { + echo 'Error 26: One time download is disabled.'; + exit; + } + $res = jirafeau_upload($_FILES['file'], isset($_POST['one_time_download']), $key, $time, get_ip_address($cfg), @@ -409,6 +415,12 @@ elseif (isset($_GET['init_async'])) { $key = $_POST['key']; } + // Check if one time download is enabled + if (!$cfg['one_time_download'] && isset($_POST['one_time_download'])) { + echo 'Error 26: One time download is disabled.'; + exit; + } + $time = time(); if (!isset($_POST['time']) || !$cfg['availabilities'][$_POST['time']]) { echo 'Error 22';