X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/blobdiff_plain/41f33f9c1dac5381412bcab57c971fd08d1d8613..4823b32b6ce68f7a6a0949c225c808da4979506f:/script.php?ds=sidebyside diff --git a/script.php b/script.php index b861a47..40d26ea 100644 --- a/script.php +++ b/script.php @@ -81,6 +81,15 @@ if (isset($_FILES['file']) && is_writable(VAR_FILES) $key = ''; if (isset($_POST['key'])) { $key = $_POST['key']; + if ($cfg['download_password_requirement'] !== 'generated' && $cfg['download_password_policy'] === 'regex'){ + if (!preg_match($cfg['download_password_policy_regex'], $key)){ + echo 'Error 14: The download password is not complying to the security standards.'; + exit; + } + } + }elseif ($cfg['download_password_requirement'] !== 'optional'){ + echo 'Error 13: The parameter password is required.'; + exit; } $time = time();