Open-AudIT
https://www.open-audit.org/phpBB3/

PATCH: wrong path to openaudit/images
https://www.open-audit.org/phpBB3/viewtopic.php?f=9&t=3739
Page 1 of 1

Author:  jonbendtsen [ Fri Jul 30, 2010 1:45 am ]
Post subject:  PATCH: wrong path to openaudit/images

Hi

I have installed my OpenAudIT in to /var/www/open-audit/ and then apache complains:
[code][Thu Jul 29 17:27:08 2010] [error] [client 192.168.119.36] File does not exist: /var/www/images, referer: http://dkopen-audit/open-audit/[/code]
when ever i load the front page.

This patch fixes the problem on the frontpage:
[code]dkopen-audit:/var/www/open-audit# svn diff index_data.php
Index: index_data.php
===================================================================
--- index_data.php (revision 1245)
+++ index_data.php (working copy)
@@ -115,7 +115,7 @@
do
{
echo "<tr class='".alternate_tr_class($tr_class)."'>";
- echo "<td><img src='../images/".$myrow['objtype']."_".$myrow['img'].".gif'></td>";
+ echo "<td><img src='./images/".$myrow['objtype']."_".$myrow['img'].".gif'></td>";
echo "<td>".$myrow['cn']."</td>";
$status = ($myrow["img"] == 'active') ? "Added" : "Deleted";
echo "<td>".$status."</td>";
@@ -349,7 +349,7 @@
echo " <td>".ip_trans($myrow["net_ip_address"])."</td>";
echo " <td><a href=\"system.php?pc=".$myrow["system_uuid"]."&amp;view=summary\">".$myrow["system_name"]."</a></td>";
echo " <td>".return_date_time($myrow["system_timestamp"])."</td>";
- echo " <td><img src='../images/computer_".$myrow['ldap_status'].".gif'></td>";
+ echo " <td><img src='./images/computer_".$myrow['ldap_status'].".gif'></td>";
echo "</tr>";
} while ($myrow = mysql_fetch_array($result));
}
@@ -1471,4 +1471,4 @@
return;
}

-?>
\ No newline at end of file
+?>
[/code]

But there might be one more similar problem in include_functions.php
[code]dkopen-audit:/var/www/open-audit# grep "\.\./images" *
include_functions.php: return "<img src='../images/user_".$myrow[$field["name"]].".gif'>";
include_functions.php: return "<img src='../images/computer_".$myrow[$field["name"]].".gif'>";
[/code]
The fix is similar, change ../images into .images/ but i will leave that as an exercise to the reader.

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/