Welcome to Geeklog, Anonymous Wednesday, December 25 2024 @ 10:44 am EST
Geeklog Forums
Ban Plugin: Can't Add Anymore Values
Status: offline
holdenpike
Forum User
Newbie
Registered: 03/14/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?
I have globals off. Could that be it?
15
12
Quote
Status: offline
asmaloney
Forum User
Full Member
Registered: 02/08/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
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
12
10
Quote
Status: offline
holdenpike
Forum User
Newbie
Registered: 03/14/05
Posts: 12
Excellent Thanks.
14
9
Quote
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.
11
14
Quote
All times are EST. The time is now 10:44 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