From: gwunderlich Date: Fri, 2 Sep 2022 14:42:37 +0000 (+0200) Subject: fix wrong location for cfg access X-Git-Tag: 4.6.0~14^2~22 X-Git-Url: https://git.p6c8.net/jirafeau.git/commitdiff_plain/a4111660b05af9df96bbe567aa43acff34b6339d fix wrong location for cfg access --- 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; }