-if ($cfg['download_password_requirement'] === "generated"){
- $download_pass = jirafeau_gen_download_pass();
+if ($cfg['download_password_requirement'] === "generated") {
+ $download_pass = jirafeau_gen_download_pass($cfg['download_password_gen_len'], $cfg['download_password_gen_chars']);
// Second check: Challenge by IP NO PASSWORD
elseif (true === jirafeau_challenge_upload_ip_without_password($cfg, get_ip_address($cfg))) {
jirafeau_user_session_start();
// Second check: Challenge by IP NO PASSWORD
elseif (true === jirafeau_challenge_upload_ip_without_password($cfg, get_ip_address($cfg))) {
jirafeau_user_session_start();
}
// Third check: Challenge by IP
elseif (true === jirafeau_challenge_upload_ip($cfg, get_ip_address($cfg))) {
}
// Third check: Challenge by IP
elseif (true === jirafeau_challenge_upload_ip($cfg, get_ip_address($cfg))) {
if (isset($_POST['upload_password'])) {
if (jirafeau_challenge_upload_password($cfg, $_POST['upload_password'])) {
jirafeau_user_session_start();
if (isset($_POST['upload_password'])) {
if (jirafeau_challenge_upload_password($cfg, $_POST['upload_password'])) {
jirafeau_user_session_start();
echo '<tr><td><label for="input_key">' . t('PSW') . ':' . '</label></td>';
echo '<td><input type="password" name="key" id="input_key" autocomplete = "new-password"';
echo '<tr><td><label for="input_key">' . t('PSW') . ':' . '</label></td>';
echo '<td><input type="password" name="key" id="input_key" autocomplete = "new-password"';
echo ' pattern="' . substr($cfg['download_password_policy_regex'], 1, strlen($cfg['download_password_policy_regex']) - 2) . '"'; //remove php delimiters
}
echo ' pattern="' . substr($cfg['download_password_policy_regex'], 1, strlen($cfg['download_password_policy_regex']) - 2) . '"'; //remove php delimiters
}