added IP ban facility - IP addresses can now be blocked from logging into
Venice, either individually or in blocks
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
//
|
||||
// The Original Code is the Venice Web Communities System.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
|
||||
// The Initial Developer of the Original Code is Eric J. Bowersox <erbo@ricochet.com>,
|
||||
// for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
|
||||
// Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
||||
// Copyright (C) 2002-2004 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
|
||||
@@ -55,7 +55,15 @@ if ("login"==call_name)
|
||||
if (rinput.user.isLoggedIn())
|
||||
vlib.output(new XmlRpcFault(XmlRpcFault.DEFAULT_ERROR,"user already logged in"));
|
||||
else
|
||||
rinput.user.authenticate(username,password);
|
||||
{ // make sure IP address is not banned yet
|
||||
banmsg = rinput.engine.testIPBan(rinput.sourceAddress);
|
||||
if (banmsg==null)
|
||||
rinput.user.authenticate(username,password);
|
||||
else
|
||||
vlib.output(new XmlRpcFault(XmlRpcFault.DEFAULT_ERROR,"IP address banned: " + banmsg);
|
||||
|
||||
} // end else
|
||||
|
||||
vlib.output(vlib.booleanObject(true));
|
||||
|
||||
} // end else
|
||||
|
||||
Reference in New Issue
Block a user