[Pkg-sympa-commits] [sympa] 01/02: Add a patch to fix endless loop in wwsympa while loading session data including metacharacters like regexp symbols (#654622)

Emmanuel Bouthenot kolter at moszumanska.debian.org
Mon Feb 9 22:54:09 UTC 2015


This is an automated email from the git hooks/post-receive script.

kolter pushed a commit to branch debian/squeeze
in repository sympa.

commit a15531c8bae956142c9153dc7ab6760a93065b30
Author: Emmanuel Bouthenot <kolter at openics.org>
Date:   Mon Feb 2 23:07:11 2015 +0000

    Add a patch to fix endless loop in wwsympa while loading session data including metacharacters like regexp symbols (#654622)
---
 .../patches/0001_fix_session_with_metachars.patch  | 34 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 35 insertions(+)

diff --git a/debian/patches/0001_fix_session_with_metachars.patch b/debian/patches/0001_fix_session_with_metachars.patch
new file mode 100644
index 0000000..7ffd411
--- /dev/null
+++ b/debian/patches/0001_fix_session_with_metachars.patch
@@ -0,0 +1,34 @@
+Description: Fix endless loop in wwsympa while loading session data
+    including metacharacters like regexp symbols (Closes: #654622)
+Author: Hatuka*nezumi - IKEDA Soji <hatuka at nezumi.nu>
+Origin: upstream, https://sourcesup.renater.fr/scm/viewvc.php?view=revision&root=sympa&revision=6323
+Bug-Debian: http://bug.debian.org/654622
+Last-Update: 2013-10-03
+--- a/src/lib/tools.pm
++++ b/src/lib/tools.pm
+@@ -3229,9 +3229,11 @@
+     my $data = shift;
+     my %hash ;
+     
+-    while ($data =~ /^(\;?(\w+)\=\"([^\"]*)\")/) {
+-	$hash{$2} = $3; 
+-	$data =~ s/$1// ;
++    pos($data) = 0;
++    while ($data =~ /\G;?(\w+)\=\"((\\[\"\\]|[^\"])*)\"(?=(;|\z))/g) {
++	my ($var, $val) = ($1, $2);
++	$val =~ s/\\([\"\\])/$1/g;
++	$hash{$var} = $val; 
+     }    
+ 
+     return (%hash);
+@@ -3246,7 +3248,9 @@
+     my $data_string ;
+     foreach my $var (keys %$refhash ) {
+ 	next unless ($var);
+-	$data_string .= ';'.$var.'="'.$refhash->{$var}.'"';
++	my $val = $refhash->{$var};
++	$val =~ s/([\"\\])/\\$1/g;
++	$data_string .= ';'.$var.'="'.$val.'"';
+     }
+     return ($data_string);
+ }
diff --git a/debian/patches/series b/debian/patches/series
index a314a50..a4222a0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+0001_fix_session_with_metachars.patch
 1001_sympa.pl_add_prepare_db_option.patch
 1004_wizard_support_batch_and_display_mode.patch
 1005_wizard_emit_cmd_and_newline_when_dying.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/sympa.git



More information about the Pkg-sympa-commits mailing list