Show message when client IP address is not allowed instead of

going stealth mode.
This commit is contained in:
hns 2002-07-16 14:45:34 +00:00
parent 2b491ebe39
commit 1b3d6adc79

View file

@ -142,12 +142,15 @@ function checkAuth(appObj) {
/** /**
* check access to the base-app by ip-addresses * check access to the manage-app by ip-addresses
*/ */
function checkAddress() { function checkAddress() {
if ( !app.data.addressFilter.matches(java.net.InetAddress.getByName(req.data.http_remotehost)) ) { if ( !app.data.addressFilter.matches(java.net.InetAddress.getByName(req.data.http_remotehost)) ) {
app.log("denied request from " + req.data.http_remotehost ); app.log("denied request from " + req.data.http_remotehost );
return forceStealth(); // forceStealth seems a bit like overkill here.
// display a message that the ip address must be added to server.properties
res.write ("Access to address "+req.data.http_remotehost+" denied.");
return false;
} else { } else {
return true; return true;
} }