From 8e9c1ad26346582d49163d9946fb789e0f800ad7 Mon Sep 17 00:00:00 2001 From: cjwatson <> Date: Fri, 27 Feb 2004 02:05:17 -0800 Subject: [PATCH] [project @ 2004-02-27 02:05:17 by cjwatson] Sanitize $data->{package} before using it as a local-part @$gSubscriptionDomain; exim barfs messily otherwise and we end up with half-written .log records (#191306 and perhaps others). --- scripts/process.in | 5 ++++- scripts/service.in | 8 +++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/process.in b/scripts/process.in index 7ce07e3c..8bc23501 100755 --- a/scripts/process.in +++ b/scripts/process.in @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: process.in,v 1.84 2003/09/18 17:31:48 cjwatson Exp $ +# $Id: process.in,v 1.85 2004/02/27 02:05:17 cjwatson Exp $ # # Usage: process nn # Temps: incoming/Pnn @@ -1088,6 +1088,9 @@ sub checkmaintainers { $anymaintfound=0; $anymaintnotfound=0; for $p (split(m/[ \t?,():]+/,$data->{package})) { $p =~ y/A-Z/a-z/; + $p =~ /([a-z0-9.+-]+)/; + $p = $1; + next unless defined $p; if (defined $gSubscriptionDomain) { if (defined($pkgsrc{$p})) { push @addsrcaddrs, "$pkgsrc{$p}\@$gSubscriptionDomain"; diff --git a/scripts/service.in b/scripts/service.in index 9f2e39c8..2a4f28b9 100755 --- a/scripts/service.in +++ b/scripts/service.in @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: service.in,v 1.95 2004/02/03 21:37:45 cjwatson Exp $ +# $Id: service.in,v 1.96 2004/02/27 02:05:17 cjwatson Exp $ # # Usage: service .nn # Temps: incoming/P.nn @@ -1054,12 +1054,14 @@ sub addmaintainers { # Data structure is: # maintainer email address &c -> assoc of packages -> assoc of bug#'s my $data = shift; - my ($p, $addmaint, $pshow); + my ($p, $addmaint); &ensuremaintainersloaded; $anymaintfound=0; $anymaintnotfound=0; for $p (split(m/[ \t?,():]+/, $data->{package})) { $p =~ y/A-Z/a-z/; - $pshow= ($p =~ m/[-+.a-z0-9]+/ ? $& : ''); + $p =~ /([a-z0-9.+-]+)/; + $p = $1; + next unless defined $p; if (defined $gSubscriptionDomain) { if (defined($pkgsrc{$p})) { addbcc("$pkgsrc{$p}\@$gSubscriptionDomain"); -- 2.39.5