From: Patrick Canterino Date: Sat, 9 Aug 2025 13:06:13 +0000 (+0200) Subject: The generated download password was not shown in the "finished" page X-Git-Tag: 4.7.0~6^2~1 X-Git-Url: https://git.p6c8.net/jirafeau/jirafeau.git/commitdiff_plain/9611fc95d7ee0f0f0fa5bc7835b07634fa09dd25 The generated download password was not shown in the "finished" page This feature got accidentally lost during refactoring Also made the form field readonly --- diff --git a/index.php b/index.php index 435e059..4881c51 100644 --- a/index.php +++ b/index.php @@ -25,7 +25,9 @@ require(JIRAFEAU_ROOT . 'lib/settings.php'); require(JIRAFEAU_ROOT . 'lib/functions.php'); require(JIRAFEAU_ROOT . 'lib/lang.php'); -if ($cfg['download_password_requirement'] === "generated") { +$download_pass = null; + +if ($cfg['download_password_requirement'] === 'generated') { $download_pass = jirafeau_gen_download_pass($cfg['download_password_gen_len'], $cfg['download_password_gen_chars']); } @@ -102,7 +104,7 @@ elseif (true === jirafeau_challenge_upload_ip($cfg, get_ip_address($cfg))) { ?> - +

diff --git a/lib/functions.php b/lib/functions.php index f9fbd9b..5d4602e 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -1779,7 +1779,7 @@ function jirafeau_write_download_stats($hash, $ip) fclose($handle); } -function jirafeau_create_upload_finished_box($preview = true) +function jirafeau_create_upload_finished_box($preview = true, $download_pass = null) { ?> @@ -1796,6 +1796,22 @@ function jirafeau_create_upload_finished_box($preview = true)

+ +
+

+ +
+

+ '?> + +

+
+
+ + +