From a4111660b05af9df96bbe567aa43acff34b6339d Mon Sep 17 00:00:00 2001 From: gwunderlich Date: Fri, 2 Sep 2022 16:42:37 +0200 Subject: [PATCH] fix wrong location for cfg access --- index.php | 2 +- lib/functions.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index ae8f11b..24565bd 100644 --- a/index.php +++ b/index.php @@ -26,7 +26,7 @@ require(JIRAFEAU_ROOT . 'lib/functions.php'); require(JIRAFEAU_ROOT . 'lib/lang.php'); if ($cfg['download_password_requirement'] === "generated"){ - $download_pass = jirafeau_gen_download_pass(); + $download_pass = jirafeau_gen_download_pass($cfg['download_password_gen_len'], $cfg['download_password_gen_chars']); } check_errors($cfg); diff --git a/lib/functions.php b/lib/functions.php index ebfffd4..f2a26e0 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -101,10 +101,8 @@ function jirafeau_gen_random($l) return $code; } -function jirafeau_gen_download_pass() +function jirafeau_gen_download_pass($length, $allowed_chars) { - $length = $cfg['download_password_gen_len']; - $allowed_chars = $cfg['download_password_gen_chars']; if ($length <= 0) { return false; } -- 2.34.1