Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] IP search bug when ip >=
Environment (as reported in the AdminCP):
MyBB: 1.4.1
PHP: 5.2.6
DB: MySQLi 4.1.22

When you search an IP address using the ModCP (modcp.php?action=ipsearch) and the IP is bigger or equal than (ie: the first byte is >= 128), it turns out that no post nor user is found (assuming that there are such ones registered in the DB, of course).

The problem is with the call to the function fetch_longipv4_range in modcp.php, which it returns a negative integer number for IPs >=; and that number is compared with the field longipaddress or longregip in the DB. However, those fields seem to have a positive number, therefore no match is found.

For example, in my forums, the page moderation.php?action=getip&pid=11 returns the IP of that post. In the DB, I see the post in the posts table with these fields: ipadress = "" and longipaddress = "2147483647". However, when I go to the page modcp.php?action=ipsearch&ipaddress= then MyBB can't find any result.

I hope you can solve this problem shortly. Thank you very much.
[Image: choli_av.php]

Messages In This Thread
[F] IP search bug when ip >= - by Choli - 2008-09-08, 10:22 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)