X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/f65244fc26208f942fbe5e5cdf5a6570dc493005..0f38bca0ce9973ca0692e74a3dcf587920a93f88:/index.php diff --git a/index.php b/index.php index 39eded5..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)) { @@ -61,7 +62,7 @@ if (!jirafeau_challenge_upload_ip($cfg, get_ip_address($cfg))) { /* Show auth page. */ if (!isset($_SESSION['upload_auth']) || $_SESSION['upload_auth'] != true) { ?> -
+
@@ -87,9 +88,13 @@ 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; } -} - +} + ?>

@@ -108,7 +113,7 @@ if (!jirafeau_challenge_upload_ip($cfg, get_ip_address($cfg))) {

:

-
@@ -243,7 +248,7 @@ if (!jirafeau_challenge_upload_ip($cfg, get_ip_address($cfg))) { - +