]> git.donarmstrong.com Git - debbugs.git/commitdiff
- Verify submitter is a valid email according to RFC822
authorDon Armstrong <don@donarmstrong.com>
Thu, 9 Aug 2007 18:31:53 +0000 (11:31 -0700)
committerDon Armstrong <don@donarmstrong.com>
Thu, 9 Aug 2007 18:31:53 +0000 (11:31 -0700)
    (closes: #182419)

debian/changelog
debian/control
scripts/service.in

index b6085a332562546db1e429038e095139ddf1e291..94966ae1583b63936f1b447d6393a2b568b87d3a 100644 (file)
@@ -203,6 +203,8 @@ debbugs (2.4.2) UNRELEASED; urgency=low
     - Make sendmail binary location configurable, and use flock instead of
       fcntl. (closes: #260791)
     - Make notfound/notfixed log verbiage more clear (closes: #434953)
+    - Verify submitter is a valid email according to RFC822
+      (closes: #182419)
 
   
  -- Colin Watson <cjwatson@debian.org>  Fri, 20 Jun 2003 18:57:25 +0100
index b2e5db2ecbd4a5f5f4fc9c4b80da76fdaa7900f0..a9788f66a02ede1a4044cdc48808c861d065453f 100644 (file)
@@ -4,11 +4,11 @@ Priority: extra
 Maintainer: Debbugs developers <debian-debbugs@lists.debian.org>
 Uploaders: Josip Rodin <joy-packages@debian.org>, Colin Watson <cjwatson@debian.org>, Don Armstrong <don@debian.org>
 Standards-Version: 3.2.1
-Build-Depends-Indep: debhelper, libparams-validate-perl, libmailtools-perl, libmime-perl, libio-stringy-perl, libmldbm-perl, liburi-perl, libsoap-lite-perl, libcgi-simple-perl, libhttp-server-simple-perl, libtest-www-mechanize-perl
+Build-Depends-Indep: debhelper, libparams-validate-perl, libmailtools-perl, libmime-perl, libio-stringy-perl, libmldbm-perl, liburi-perl, libsoap-lite-perl, libcgi-simple-perl, libhttp-server-simple-perl, libtest-www-mechanize-perl, libmail-rfc822-address-perl
 
 Package: debbugs
 Architecture: all
-Depends: ${perl:Depends}, exim4 | mail-transport-agent, libdebbugs-perl
+Depends: ${perl:Depends}, exim4 | mail-transport-agent, libdebbugs-perl, libmail-rfc822-address-perl
 Recommends: debbugs-web
 Suggests: spamassassin (>= 3.0), libcgi-alert-perl
 Description: The bug tracking system based on the active Debian BTS
index 2353b4f242abee8415c1ad5f066586810b3080bc..0cfe4f0f50757abab382d52f2526e1b2c1a8cd25 100755 (executable)
@@ -17,6 +17,8 @@ use Debbugs::CGI qw(html_escape);
 use Debbugs::Control qw(:archive :log);
 use Debbugs::Log qw(:misc);
 
+use Mail::RFC822::Address;
+
 $lib_path = $gLibPath;
 require "$lib_path/errorlib";
 $ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'};
@@ -636,7 +638,11 @@ END
         if ($ref =~ m/^-\d+$/ && defined $clonebugs{$ref}) {
             $ref = $clonebugs{$ref};
         }
-        if (&getbug) {
+       if (not Mail::RFC822::Address::valid($newsubmitter)) {
+            transcript("$newsubmitter is not a valid e-mail address; not changing submitter\n");
+            $errors++;
+       }
+        elsif (&getbug) {
             if (&checkpkglimit) {
                 &foundbug;
                 &addmaintainers($data);