added warning message if upload forbidden instead of just 401 error

This commit is contained in:
Chris
2020-06-23 09:26:39 +02:00
parent 0250b6a577
commit 8de53d1ea7
2 changed files with 11 additions and 3 deletions

View File

@@ -25,12 +25,12 @@ function architect($url)
if( ( (!defined('UPLOAD_FORM_LOCATION') || (defined('UPLOAD_FORM_LOCATION') && !UPLOAD_FORM_LOCATION)) && count($u)==0) || (defined('UPLOAD_FORM_LOCATION') && UPLOAD_FORM_LOCATION && '/'.implode('/',$u)==UPLOAD_FORM_LOCATION) )
{
// check if client address is allowed
$forbidden = false;
if(defined('ALLOWED_SUBNET') && !isIPInRange( getUserIP(), ALLOWED_SUBNET ))
{
header("HTTP/1.1 401 Unauthorized");
exit;
$forbidden = true;
}
renderTemplate('main');
renderTemplate('main',array('forbidden'=>$forbidden));
return;
}