[Pkg-voip-commits] r3627 - in freepbx/trunk/debian: . patches

elcuco-guest at alioth.debian.org elcuco-guest at alioth.debian.org
Wed May 30 09:59:48 UTC 2007


Author: elcuco-guest
Date: 2007-05-30 09:59:48 +0000 (Wed, 30 May 2007)
New Revision: 3627

Added:
   freepbx/trunk/debian/patches/fix-mysql-real-escape-string.dpatch
Modified:
   freepbx/trunk/debian/changelog
   freepbx/trunk/debian/patches/00list
   freepbx/trunk/debian/patches/quiet-retrieve.dpatch
   freepbx/trunk/debian/patches/use-conf-defaults.dpatch
Log:
 * all dpatch now contain a warning which says when to be removed (2.2.2 or 2.3)
 * fix for upstream http://www.freepbx.org/trac/ticket/1963



Modified: freepbx/trunk/debian/changelog
===================================================================
--- freepbx/trunk/debian/changelog	2007-05-28 15:16:24 UTC (rev 3626)
+++ freepbx/trunk/debian/changelog	2007-05-30 09:59:48 UTC (rev 3627)
@@ -1,4 +1,4 @@
-freepbx (2.2.1~dfsg-1) UNRELEASED; urgency=low
+freepbx (2.2.1~dfsg-0.0.diego1) UNRELEASED; urgency=low
 
   * NOT RELEASED YET
 
@@ -25,6 +25,8 @@
     mode 660, as they contain passowrds - they should not be world readable.
   * freepbx-common: updated use_conf_defaults to fix upstream: 
     http://freepbx.org/trac/ticket/1921
+  * freepbx-common: added fix-mysql-real-escape-string.dpatch, fixes upstream
+    http://www.freepbx.org/trac/ticket/1963
 
   [ Chris Halls ]
   * Remove fix-recordings.patch - already fixed in a different way upstream

Modified: freepbx/trunk/debian/patches/00list
===================================================================
--- freepbx/trunk/debian/patches/00list	2007-05-28 15:16:24 UTC (rev 3626)
+++ freepbx/trunk/debian/patches/00list	2007-05-30 09:59:48 UTC (rev 3627)
@@ -3,6 +3,7 @@
 use-conf-defaults
 fix-open-or-die
 quiet-retrieve
+fix-mysql-real-escape-string
 
 # debian/xorcom enhancements
 ast-config-dirs

Added: freepbx/trunk/debian/patches/fix-mysql-real-escape-string.dpatch
===================================================================
--- freepbx/trunk/debian/patches/fix-mysql-real-escape-string.dpatch	                        (rev 0)
+++ freepbx/trunk/debian/patches/fix-mysql-real-escape-string.dpatch	2007-05-30 09:59:48 UTC (rev 3627)
@@ -0,0 +1,40 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fix-mysql-real-escape-string.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: systems running on sqlite3 (or pgsql) this function is not available
+## DP: instead of changing the whole code, lets hack our own version of this function.
+## DP: according to the documentation found here: http://il2.php.net/mysql_real_escape_string
+## DP: this shold be enough.
+## DP: fixes upstream: http://www.freepbx.org/trac/ticket/1963
+
+
+
+ at DPATCH@
+diff -urNad upstream~/amp_conf/htdocs/admin/header.php upstream/amp_conf/htdocs/admin/header.php
+--- upstream~/amp_conf/htdocs/admin/header.php	2006-12-09 01:48:17.000000000 +0200
++++ upstream/amp_conf/htdocs/admin/header.php	2007-05-30 12:31:59.000000000 +0300
+@@ -74,6 +74,24 @@
+ 	textdomain('amp');
+ }
+ 
++// systems running on sqlite3 (or pgsql) this function is not available
++// instead of changing the whole code, lets hack our own version of this function.
++// according to the documentation found here: http://il2.php.net/mysql_real_escape_string
++// this shold be enough.
++if (!function_exists('mysql_real_escape_string')) {
++	function mysql_real_escape_string($str) {
++		$str = str_replace( "\x00", "\\" . "\x00", $str );
++		$str = str_replace( "\x1a", "\\" . "\x1a", $str );
++		$str = str_replace( "\n" , "\\". "\n"    , $str );
++		$str = str_replace( "\r" , "\\". "\r"    , $str );
++		$str = str_replace( "\\" , "\\". "\\"    , $str );
++		$str = str_replace( "'" , "\\". "'"      , $str );
++		$str = str_replace( '"' , "\\". '"'      , $str );
++		return $str;
++	}
++}
++
++
+ if (!$quietmode) {
+ ?>
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


Property changes on: freepbx/trunk/debian/patches/fix-mysql-real-escape-string.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Modified: freepbx/trunk/debian/patches/quiet-retrieve.dpatch
===================================================================
--- freepbx/trunk/debian/patches/quiet-retrieve.dpatch	2007-05-28 15:16:24 UTC (rev 3626)
+++ freepbx/trunk/debian/patches/quiet-retrieve.dpatch	2007-05-30 09:59:48 UTC (rev 3627)
@@ -1,8 +1,9 @@
 #! /bin/sh /usr/share/dpatch/dpatch-run
 ## quiet-retrieve.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
 ##
-## DP: when no address defined for the web root, ask to relod the server, and don't type an empty address. the code has been taken from install_amp
-## DP: comited upstream at 3981, to be removed for 2.2.2
+## DP: when no address defined for the web root, ask to reload the server, 
+## DP: and don't type an empty address. the code has been taken from install_amp
+## DP: comited upstream at 3981, to be removed for 2.2.2 or 2.3
 
 @DPATCH@
 diff -urNad upstream~/amp_conf/bin/retrieve_conf upstream/amp_conf/bin/retrieve_conf

Modified: freepbx/trunk/debian/patches/use-conf-defaults.dpatch
===================================================================
--- freepbx/trunk/debian/patches/use-conf-defaults.dpatch	2007-05-28 15:16:24 UTC (rev 3626)
+++ freepbx/trunk/debian/patches/use-conf-defaults.dpatch	2007-05-30 09:59:48 UTC (rev 3627)
@@ -5,7 +5,7 @@
 ## DP: Needed to ensure that correct defaults are used when configuration
 ## DP: entries are missing from amportal.conf. Defaults are copied from
 ## DP: amp_conf/htdocs/admin/functions.inc.php
-## DP: Commited upstream at revision 3775. To be removed when packaging 2.2.1
+## DP: Commited upstream at revision 3775. To be removed when packaging 2.2.1 or 2.3
 ## DP: Contains a fix for upstream bug: http://freepbx.org/trac/ticket/1921
 
 @DPATCH@




More information about the Pkg-voip-commits mailing list