tags 349919 + patch
thanks

Marc 'HE' Brockschmidt <[EMAIL PROTECTED]> writes:
> A correct fix for #349919 would be to use parseaddr(address) from
> email.utils, but that still won't work for the broken maintainer name
> you quoted in your initial bug report (as all tools expect the content
> of the Maintainer and Uploaders field to conform to RFC822 address
> lists).

I've thought about this again and hacked up a workaround for this
issue. It's not really nice, but it will not lead to a backtrace...

Attached patch is done on top of my RE patch for the whitelists from
#413338.

Marc
-- 
Fachbegriffe der Informatik - Einfach erklärt
263: MCSE
       Meine Computerkenntisse Sind Erbärmlich (Sebastian Posner)

diff -Nwru dak-1.0/utils.py dak-1.0.new/utils.py
--- dak-1.0/utils.py	2007-03-08 09:28:57.000000000 +0100
+++ dak-1.0.new/utils.py	2007-03-08 09:32:23.000000000 +0100
@@ -24,7 +24,7 @@
 
 import commands, encodings.ascii, encodings.utf_8, encodings.latin_1, \
        email.Header, os, pwd, re, select, socket, shutil, string, sys, \
-       tempfile, traceback;
+       tempfile, traceback, email.Utils;
 import apt_pkg;
 import db_access;
 import email as modemail
@@ -399,8 +399,10 @@
                 value = message_raw.get(field, None)
                 if value != None:
                     match = [];
-                    for item in value.split(","):
-                        (rfc822_maint, rfc2047_maint, name, email) = fix_maintainer(item.strip())
+                    for item in email.Utils.getaddresses([value]):
+                        (name, email) = item
+                        if not email == None or mail.find("@") == -1 :
+                            continue
                         mail_whitelisted = 0
                         for wr in whitelist:
                             if wr.match(email):

Attachment: pgpKZlnLfXFcV.pgp
Description: PGP signature

Reply via email to