Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Thu Mar 28, 2024 8:49 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: search.php bug
PostPosted: Wed Oct 25, 2006 9:10 pm 
Offline
Newbie

Joined: Wed Oct 25, 2006 8:55 pm
Posts: 4
Location: Portugal
if the search query returns an empty value, search.php will display an error on line 168
due to
[code]
sort($result_set);
[/code]

before

[code]
$count = count ($result_set);
for ($i=0; $i<$count; $i++){
[/code]

this is obviously easy to fix BUT the bug i do want to ask about is regarding IP address search.php queries.

i have a machine that has the ip address 172.16.10.1 and if I search for that address it returns no results. after reading the code and checking openaudit.system for net_ip_address field, i see this:

[code]
mysql> select net_ip_address from system;
+-----------------+
| net_ip_address |
+-----------------+
| 172.016.010.001 |
+-----------------+
1 rows in set (0.00 sec)

mysql>
[/code]

so i went and read search.php and i see that since searching correctly for an IP address would require some transformation (using the function in include_functions.php called ip_trans_to() ), and as we see the 'search' sql query, it uses $search... so we cannot transform the input because we don't know first hand the nature of the query...

[code]
$sql .= "net_ip_address LIKE '%$search%' OR ";
[/code]

is search.php going to be redesign ? any design ideas or requirements? i need this functionality now so I'm going to implement my own search.php version... (search.php with an 'advanced' search option)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group