From: Blackeye <14815724-Blackstareye@users.noreply.gitlab.com> Date: Sat, 31 Oct 2026 00:32:20 +0000 (+0100) Subject: Merge branch 'allow-disallow-extensions' into 'next-release' X-Git-Tag: 4.8.0~11 X-Git-Url: https://git.p6c8.net/jirafeau/jirafeau.git/commitdiff_plain/5180854ea1087330a8d472e63cfa0ba54b0666ea?hp=03ed5327384d8fb6f25fc60f6f4e249458f15c8a Merge branch 'allow-disallow-extensions' into 'next-release' Add a config option to forbid certain file extensions for uploads See merge request jirafeau/Jirafeau!39 --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 613ab9b..1a8d24e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,15 +63,6 @@ job_lint_app_81: before_script: *before_linter_script script: *linter_script <<: *linter_warning - - - -# Run tests for php:7.4 -job_lint_app_74: - image: php:7.4 - before_script: *before_linter_script - script: *linter_script - <<: *linter_warning # ================= # Deprecated ones END diff --git a/AUTHORS.md b/AUTHORS.md index 9eaa5e5..84f5110 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -23,6 +23,7 @@ This is a list of people who contributed to Jirafeau over the years. The list wa - Cem - Dan Untenzu - Dark Horse +- Davi Torres - Dennis de Best - Edwin Bos - Erik Hubers @@ -68,6 +69,7 @@ This is a list of people who contributed to Jirafeau over the years. The list wa - Mathis Mensing - Matthieu Schneider - Mattias Münster +- Max Hausch - max keiser - Michal Čihař - Milo Ivir @@ -120,4 +122,4 @@ This is a list of people who contributed to Jirafeau over the years. The list wa - Zertrin - Zoltán Faludi - Степанчук Максим -- Слободан Симић \ No newline at end of file +- Слободан Симић diff --git a/CHANGELOG.md b/CHANGELOG.md index a85065c..c463437 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,11 @@ ## Version 4.7.x (not yet released) +- Download stats are written before a one-time link is deleted. The other way around would cause write attempts to a directory that was already gone. +- The `time` parameter is now optional in `script.php` +- Few little more fixes and refactoring - ... +- Upgrade from 4.7.2: in-place upgrade ## Version 4.7.2 diff --git a/f.php b/f.php index 3523596..9454540 100644 --- a/f.php +++ b/f.php @@ -274,12 +274,12 @@ else { } } +jirafeau_write_download_stats($link_name, get_ip_address($cfg)); + if ($link['onetime'] == 'O') { jirafeau_delete_link($link_name); } -jirafeau_write_download_stats($link_name, get_ip_address($cfg)); - exit; ?> diff --git a/script.php b/script.php index 671aeef..39eb9d2 100644 --- a/script.php +++ b/script.php @@ -94,7 +94,9 @@ if (isset($_FILES['file']) && is_writable(VAR_FILES) exit; } - if (!isset($_POST['time']) || !$cfg['availabilities'][$_POST['time']]) { + if (!isset($_POST['time'])) { + $time = jirafeau_datestr_to_int($cfg['availability_default']); + } elseif (!$cfg['availabilities'][$_POST['time']]) { echo 'Error 4: The parameter time is invalid.'; exit; } else { @@ -453,7 +455,9 @@ elseif (isset($_GET['init_async'])) { exit; } - if (!isset($_POST['time']) || !$cfg['availabilities'][$_POST['time']]) { + if (!isset($_POST['time'])) { + $time = jirafeau_datestr_to_int($cfg['availability_default']); + } elseif (!$cfg['availabilities'][$_POST['time']]) { echo 'Error 22'; exit; } else {