]> git.p6c8.net - jirafeau/jirafeau.git/commitdiff
Merge branch 'allow-disallow-extensions' into 'next-release'
authorBlackeye <14815724-Blackstareye@users.noreply.gitlab.com>
Sat, 31 Oct 2026 00:32:20 +0000 (01:32 +0100)
committerBlackeye <14815724-Blackstareye@users.noreply.gitlab.com>
Sat, 31 Oct 2026 00:32:20 +0000 (01:32 +0100)
Add a config option to forbid certain file extensions for uploads

See merge request jirafeau/Jirafeau!39

.gitlab-ci.yml
AUTHORS.md
CHANGELOG.md
f.php
script.php

index 613ab9b6e3d819a399ed152c4000ba77d8bc8c47..1a8d24e117b392cf2d6fdf6efd01a9827791980a 100644 (file)
@@ -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
index 9eaa5e5b785c2775ff4e28599435715058eae969..84f5110f575dcee74436a0031c70f2e8ed27f6ea 100644 (file)
@@ -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
+- Слободан Симић
index a85065ce8f489c14f4124d11e0c996334d286a4d..c4634371fb91260680d254282a248f9b3757f56a 100644 (file)
 
 ## 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 352359668f61c4cf7b4b1a06f1d019df7ca77ed5..9454540c44ae0ff404b680cc9eb987ed032f8b7a 100644 (file)
--- 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;
 
 ?>
index 671aeef331d9908dc527103358cb03437a9a2b24..39eb9d2a54c04c7485de944b6e78afda1af1af97 100644 (file)
@@ -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 {

patrick-canterino.de