Welcome to Geeklog Tuesday, November 12 2019 @ 06:03 am EST

Geeklog Forums

Ban Plugin: Can't Add Anymore Values


Status: offline

holdenpike

Forum User
Newbie
Registered: 14/03/05
Posts: 12
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?

Status: offline

asmaloney

Forum User
Full Member
Registered: 08/02/04
Posts: 214
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

Status: offline

holdenpike

Forum User
Newbie
Registered: 14/03/05
Posts: 12
Excellent Thanks.

ironmax

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.

All times are EST. The time is now 06:03 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content