postgres.git / summary / log / commit / refs
commit 24ccd11a6c1045f684ee9a00788a27ccb85dd694
Author: Bruce Momjian <bruce@momjian.us>
Date: Thu Jul 06 02:02:48 2006 +0000
First released in: 7.3.16, 7.4.14, 8.0.9
Fix dbmirror for new backslash escaping:
Martin Pitt [2006-06-16 0:15 +0200]:
> Upstream confirmed my reply in the last mail in [1]: the complete
> escaping logic in DBMirror.pl is seriously screwew.
>
> [1] http://archives.postgresql.org/pgsql-bugs/2006-06/msg00065.php
I finally found some time to debug this, and I think I found a better
patch than the one you proposed. Mine is still hackish and is still a
workaround around a proper quoting solution, but at least it repairs
the parsing without introducing the \' quoting again.
I consider this a band-aid patch to fix the recent security update.
PostgreSQL gurus, would you consider applying this until a better
solution is found for DBMirror.pl?
Martin Pitt http://www.piware.de
contrib/dbmirror/DBMirror.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/dbmirror/DBMirror.pl b/contrib/dbmirror/DBMirror.pl
index 591b039816f..22c8e5c0ece 100755
--- a/contrib/dbmirror/DBMirror.pl
+++ b/contrib/dbmirror/DBMirror.pl
@@ -33,7 +33,7 @@
#
#
##############################################################################
-# $Id: DBMirror.pl,v 1.6.4.1 2006/05/21 19:57:06 momjian Exp $
+# $Id: DBMirror.pl,v 1.6.4.2 2006/07/06 02:02:48 momjian Exp $
#
##############################################################################
@@ -852,7 +852,7 @@ sub extractData($$) {
$matchString = $1;
$value .= substr $matchString,0,length($matchString)-1;
- if($matchString =~ m/(\'$)/s) {
+ if($matchString =~ m/(\'$)/s and (substr $dataField,length($matchString),1) ne "'") {
# $1 runs to the end of the field value.
$dataField = substr $dataField,length($matchString)+1;
last;
[parent: 9e6815ef0f07]