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 Wed Apr 17, 2024 3:05 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
PostPosted: Wed Sep 09, 2009 7:42 pm 
Offline
Newbie

Joined: Wed Sep 05, 2007 1:20 am
Posts: 23
Hi, I wasn't able to delete some systems I had. After a closer look I discovered that the wrong uuid was sent to mysql from the html page.

If the system uuid has a whitespace (workgroups can have whitespaces) in it's system id, then the "id" and other attributes are not enclosed with quotation marks, as they should be regardless of whitespaces and therefore a partial id is sent to mysql.

Here's a patch for delete_missed_audits.php, but I'm sure the same problem is in numerous other places and should be fixed there as well:
[code]
open-audit>svn diff delete_missed_audits.php
Index: delete_missed_audits.php
===================================================================
--- delete_missed_audits.php (revision 1185)
+++ delete_missed_audits.php (working copy)
@@ -229,7 +229,7 @@
do {
$bgcolor = change_row_color($bgcolor,$bg1,$bg2);
echo "<tr style=\"bgcolor:" . $bgcolor . ";\">
- <td width=\"5%\"><input type=\"checkbox\" name=" . $myrow["system_uuid"] . " id=" . $myrow["system_uuid"] . " value=" . $myrow["system_uuid"] . "></td>
+ <td width=\"5%\"><input type=\"checkbox\" name=\"" . $myrow["system_uuid"] . "\" id=\"" . $myrow["system_uuid"] . "\" value=\"" . $myrow["system_uuid"] . "\"></td>
<td><a href=\"system.php?pc=".$myrow["system_uuid"]."&amp;view=summary\">" . ip_trans($myrow["net_ip_address"]) . "</a></td>
<td><a href=\"system.php?pc=".$myrow["system_uuid"]."&amp;view=summary\">" . $myrow["system_name"] . "</a></td>
<td>" . $myrow["net_domain"] . "</td>
[/code]

On the other hand I'm not really sure that the system id's are chosen carefully enough to avoid duplicates.


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