From c0b61e36b30a9b08b2e3b12e2fa6c3bbccbdf547 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 11 Feb 2012 09:28:17 +0100 Subject: OCS Inventory NG 2.0.4 --- ocsinventory-deprecated.patch | 78 ------------------------------------------- ocsinventory.spec | 24 ++++++------- 2 files changed, 11 insertions(+), 91 deletions(-) delete mode 100644 ocsinventory-deprecated.patch diff --git a/ocsinventory-deprecated.patch b/ocsinventory-deprecated.patch deleted file mode 100644 index de46c86..0000000 --- a/ocsinventory-deprecated.patch +++ /dev/null @@ -1,78 +0,0 @@ -diff -up ocsreports/plugins/main_sections/ms_dict/ms_dict.php.orig ocsreports/plugins/main_sections/ms_dict/ms_dict.php ---- ocsreports/plugins/main_sections/ms_dict/ms_dict.php.orig 2011-11-28 17:54:50.000000000 +0100 -+++ ocsreports/plugins/main_sections/ms_dict/ms_dict.php 2011-11-28 17:55:45.000000000 +0100 -@@ -37,8 +37,8 @@ if ($protectedPost['RESET']=="RESET") - unset($protectedPost['search']); - //filtre - if ($protectedPost['search']){ -- $search_cache=" and cache.name like '%".mysql_escape_string($protectedPost['search'])."%' "; -- $search_count=" and extracted like '%".mysql_escape_string($protectedPost['search'])."%' "; -+ $search_cache=" and cache.name like '%".mysql_real_escape_string($protectedPost['search'])."%' "; -+ $search_count=" and extracted like '%".mysql_real_escape_string($protectedPost['search'])."%' "; - } - else{ - $search=""; -@@ -123,7 +123,7 @@ if ($protectedPost['onglet'] == 'CAT'){ - } - $querydico=substr($querydico,0,-1); - $querydico .= " from dico_soft left join ".$table." cache on dico_soft.extracted=cache.name -- where formatted='".mysql_escape_string($list_cat[$protectedPost['onglet_soft']])."' ".$search_count." group by EXTRACTED"; -+ where formatted='".mysql_real_escape_string($list_cat[$protectedPost['onglet_soft']])."' ".$search_count." group by EXTRACTED"; - } - /*******************************************************CAS OF NEW*******************************************************/ - if ($protectedPost['onglet'] == 'NEW'){ -@@ -311,4 +311,4 @@ echo ""; - echo ""; - echo ""; --?> -\ Pas de fin de ligne à la fin du fichier. -+?> -diff -up ocsreports/require/function_dico.php.orig ocsreports/require/function_dico.php ---- ocsreports/require/function_dico.php.orig 2011-11-28 17:56:55.000000000 +0100 -+++ ocsreports/require/function_dico.php 2011-11-28 17:57:01.000000000 +0100 -@@ -46,7 +46,7 @@ function trans($onglet,$list_soft,$affec - $table="softwares"; - //verif is this cat exist - if ($new_cat != ''){ -- $sql_verif="select extracted from dico_soft where formatted ='".mysql_escape_string($new_cat)."'"; -+ $sql_verif="select extracted from dico_soft where formatted ='".mysql_real_escape_string($new_cat)."'"; - $result_search_soft = mysql_query( $sql_verif, $_SESSION['OCS']["readServer"]); - $item_search_soft = mysql_fetch_object($result_search_soft); - if (isset($item_search_soft->extracted) or $new_cat == "IGNORED" or $new_cat == "UNCHANGED"){ -@@ -71,10 +71,10 @@ function trans($onglet,$list_soft,$affec - }elseif($exist_cat == "UNCHANGED"){ - $sql="insert dico_soft (extracted,formatted) select distinct NAME,NAME from ".$table." where ID in (".implode(",",$list_soft).")"; - }else -- $sql="insert dico_soft (extracted,formatted) select distinct NAME,'".mysql_escape_string($exist_cat)."' from ".$table." where ID in (".implode(",",$list_soft).")"; -+ $sql="insert dico_soft (extracted,formatted) select distinct NAME,'".mysql_real_escape_string($exist_cat)."' from ".$table." where ID in (".implode(",",$list_soft).")"; - }else{ - if (!isset($already_exist)){ -- $sql="insert dico_soft (extracted,formatted) select distinct NAME,'".mysql_escape_string($new_cat)."' from ".$table." where ID in (".implode(",",$list_soft).")"; -+ $sql="insert dico_soft (extracted,formatted) select distinct NAME,'".mysql_real_escape_string($new_cat)."' from ".$table." where ID in (".implode(",",$list_soft).")"; - }else - echo ""; - } -diff -up ocsreports/require/function_table_html.php.orig ocsreports/require/function_table_html.php ---- ocsreports/require/function_table_html.php.orig 2011-11-28 17:57:10.000000000 +0100 -+++ ocsreports/require/function_table_html.php 2011-11-28 17:57:38.000000000 +0100 -@@ -163,7 +163,7 @@ function escape_string($array){ - function xml_escape_string($array){ - foreach ($array as $key=>$value){ - $trait_array[$key]=xml_encode($value); -- //$trait_array[$key]=mysql_escape_string($value); -+ //$trait_array[$key]=mysql_real_escape_string($value); - } - return ($trait_array); - } -@@ -801,8 +801,8 @@ function onglet($def_onglets,$form_name, - $current=1; - } - }else{ -- //echo ""; -- if (mysql_escape_string(stripslashes($protectedPost[$post_name])) === mysql_escape_string(stripslashes($key)) or (!isset($protectedPost[$post_name]) and $current != 1)){ -+ //echo ""; -+ if (mysql_real_escape_string(stripslashes($protectedPost[$post_name])) === mysql_real_escape_string(stripslashes($key)) or (!isset($protectedPost[$post_name]) and $current != 1)){ - echo "id='current'"; - $current=1; - } diff --git a/ocsinventory.spec b/ocsinventory.spec index ea11576..54c808a 100644 --- a/ocsinventory.spec +++ b/ocsinventory.spec @@ -11,7 +11,7 @@ Name: ocsinventory Summary: Open Computer and Software Inventory Next Generation -Version: 2.0.3 +Version: 2.0.4 Release: 1%{?dist} Group: Applications/Internet @@ -22,10 +22,6 @@ URL: http://www.ocsinventory-ng.org/ Source0: http://launchpad.net/ocsinventory-server/stable-2.0/%{version}/+download/%{tarname}-%{version}.tar.gz Source1: ocsinventory-reports.conf -# s/mysql_escape_string/mysql_real_escape_string/ -# http://bazaar.launchpad.net/~ocsinventory-core/ocsinventory-ocsreports/stable-2.0/revision/800 -Patch0: %{name}-deprecated.patch - BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl(ExtUtils::MakeMaker) @@ -103,12 +99,9 @@ de données. %package reports Group: Applications/Internet Summary: OCS Inventory NG - Communication server -# From PHP_Compat : date, mysql, ereg, pcre, zip, hash, xml, gd, zlib +# From phpci : curl, date, dom, imap, ldap, mysql, openssl, pcre, session, xml, zlib Requires: php -Requires: php-mysql php-gd php-domxml -%if 0%{?fedora} < 16 -Requires: php-zip -%endif +Requires: php-mysql php-gd php-xml php-imap php-ldap # Required by the original setup script, but not detected automatically : Requires: perl(DBD::mysql) # Required by ipdiscover-util.pl (nmap and nmblookup) @@ -132,8 +125,6 @@ navigateur favori. %prep %setup -q -n %{tarname}-%{version} -%patch0 -p0 - chmod -x binutils/ocs-errors cat >external-agents.conf <external-agents.conf < - 2.0.4-1 +- update to 2.0.4 + * Mon Nov 28 2011 Remi Collet - 2.0.3-1 - update to 2.0.3 - drop patches merged upstream -- cgit