Subject: Ban Plugin: Can't Add Anymore Values

Posted on: 26/07/06 10:20am
By: holdenpike

I have the Ban plugin installed and it is a great feature. However I cannot seem to add anymore IP address or refferers to the list to ban.

I have globals off. Could that be it?

Ban Plugin: Can't Add Anymore Values

Posted on: 26/07/06 11:15am
By: asmaloney

Yep - that's it.

I did a quick fix for this. In functions.inc's BAN_check(), I changed this:

global $HTTP_USER_AGENT, $REMOTE_ADDR, $HTTP_REFERER, $_TABLES, $SCRIPT_NAME, $_BAN_log, $_BAN_page;

to this:

global $_TABLES, $SCRIPT_NAME, $_BAN_log, $_BAN_page;

$HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];
$REMOTE_ADDR = $_SERVER['REMOTE_ADDR'];
$HTTP_REFERER = $_SERVER['HTTP_REFERER'];


In admin/logview.php, I added this after the security check at the top:

$log = (isset( $_REQUEST['log'] ) ? $_REQUEST['log'] : 'ban.log');
$action = (isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : '');


And in admin/index.php, I added this:

$newdata = (isset( $_REQUEST['newdata'] ) ? $_REQUEST['newdata'] : '');

before the line:

if (!get_magic_quotes_gpc()) {



Note that this was a quick runthrough the code - I didn't do a full audit to determine other issues.

- Andy

Ban Plugin: Can't Add Anymore Values

Posted on: 26/07/06 11:48am
By: holdenpike

Excellent Thanks.

Ban Plugin: Can't Add Anymore Values

Posted on: 17/08/06 03:16am
By: Anonymous

Finally, I ran across this posting and seen what my problem was. Never thought it might have been because the globals were off. So I made the changes and whoa...my ban.log file actually started to acumalate again. Thanks again for the update. Maybe now those spammers will actually get a clue and just go away.

Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=68671