FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » FUDforum 3.0+ » Bug: Error with adding IP to filter
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Bug: Error with adding IP to filter [message #2098] Tue, 30 April 2002 19:41 Go to next message
Olliver   Germany
Messages: 443
Registered: March 2002
Karma: 0
Senior Member
Hi,
there goes the 2nd one:
When u add an IP to be filterred in the style u apply it to Apache (for instance 213.20., 127. etc) it will crash as follows:
Quote:

Query Failed: INSERT INTO fud2_ip_block (ca, cb, cc, cd) VALUES (216,208,,255)
Reason: You have an error in your SQL syntax near '255)' at line 1
From: /usr/local/httpd/htdocs/kunden/web180/html/forum/adm/admipfilter.php
Server Version: 3.23.37-log

Obviously it expects a fully written IP mask as for instance 213.20.255.255 if I want to keep out the whole Class B.
Bye
Ken
Re: Bug: Error with adding IP to filter [message #2099 is a reply to message #2098] Tue, 30 April 2002 19:50 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
entering 1.1.1 will ban the entire 1.1.1.0/24 mask

Thr query failure is because the code contains no error checking and you're trying to add a char as an int.


FUDforum Core Developer

[Updated on: Tue, 30 April 2002 19:51]

Report message to a moderator

Re: Bug: Error with adding IP to filter [message #2100 is a reply to message #2098] Tue, 30 April 2002 19:50 Go to previous messageGo to next message
hackie is currently offline  hackie   Canada
Messages: 177
Registered: January 2002
Karma: 0
Senior Member
Core Developer

Err... well.. it's actually an "input" confusion and the lack of error checking.. the forum can indeed filter by masks... just make sure **NOT** to have a trailing dot...

i.e.
127 is correct
as opposed
127.
which isn't.... Razz.... will fix it in the control panel...

but if you wunna block out
127/8
then you say 127 as opposed to 127. it will work Smile


cc intelligence.c -o intelligence
$ ./intelligence
Segmentation fault
Re: Bug: Error with adding IP to filter [message #2101 is a reply to message #2100] Tue, 30 April 2002 19:57 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Okie, I've added a handler for the:

1.1.1. situation as well as 1..1.1 situation

1.1.1. == 1.1.1.0/24
1..1.1 == 1.*.1.1

Affected file admipfiler.php


FUDforum Core Developer

[Updated on: Tue, 30 April 2002 19:58]

Report message to a moderator

Re: Bug: Error with adding IP to filter [message #2103 is a reply to message #2100] Tue, 30 April 2002 20:01 Go to previous messageGo to next message
Olliver   Germany
Messages: 443
Registered: March 2002
Karma: 0
Senior Member
One can only find bugs by testing with invalid input. Smile Let's see if I find some more stuff tonight Razz
bye
Ken
Re: Bug: Error with adding IP to filter [message #2104 is a reply to message #2103] Tue, 30 April 2002 20:04 Go to previous message
hackie is currently offline  hackie   Canada
Messages: 177
Registered: January 2002
Karma: 0
Senior Member
Core Developer

Ken Kizaki wrote on Tue, 30 April 2002 4:01 PM

One can only find bugs by testing with invalid input. Smile Let's see if I find some more stuff tonight Razz
bye
Ken


Go Ken go Smile!


cc intelligence.c -o intelligence
$ ./intelligence
Segmentation fault
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: 1st new Bug in RC3
Next Topic: Display of Forum Stats
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 21 13:35:41 GMT 2024

Total time taken to generate the page: 0.02631 seconds