X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/89d002baaa196b21ac4d4072e21e7451c47a2355..041d7ce7940d63e8bf5edc7ef3d7bf9b1774d82e:/index.php?ds=sidebyside diff --git a/index.php b/index.php index 6d1dc10..7c24e3b 100644 --- a/index.php +++ b/index.php @@ -34,7 +34,8 @@ if (has_error()) { require(JIRAFEAU_ROOT . 'lib/template/header.php'); /* Check if user is allowed to upload. */ -if (!jirafeau_challenge_upload_ip($cfg, get_ip_address($cfg))) { +if (!jirafeau_challenge_upload_ip($cfg, get_ip_address($cfg)) || + count($cfg['upload_ip']) == 0) { /* Ask password if upload password is set. */ if (jirafeau_has_upload_password($cfg)) { @@ -87,8 +88,12 @@ if (!jirafeau_challenge_upload_ip($cfg, get_ip_address($cfg))) { require(JIRAFEAU_ROOT.'lib/template/footer.php'); exit; } + } else { + echo '

' . t('Access denied') . '

'; + require(JIRAFEAU_ROOT.'lib/template/footer.php'); + exit; } -} +} ?>