gfidente / mlapd

MLAPD is a mailing list access manager which uses LDAP to check for user's rights to post messages
0 stars 0 forks source link

Parsing of postfix keyvalue pair fails for sender containing = #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

While debugging a nagging problem with mlapd and mails from black berry I found 
that parsing of sender= line from postfix with from address containing = fails 
in mlapd. To verify this you can use a sender address like 

abc=bdc=xyz@domain.com

I have a simple patch (hopefully) fixing this problem. Pl take a look:

--- mlapd.py.orig   2010-12-20 22:08:03.000000000 +0530
+++ mlapd.py    2010-12-20 22:08:15.000000000 +0530
@@ -141,7 +141,7 @@
             logging.debug("parsing: " + self.line)
             if self.line.find('=') != -1:
                 self.key = self.line.split('=')[0]
-                self.value = self.line.split('=')[1]
+                self.value = self.line.split('=', 1)[1]
                 self.map[self.key] = self.value
         elif len(self.map) is not 0:
             try:

This patch is against the latest released version of mlapd.

with regards,

raj

Original issue reported on code.google.com by rajkum...@gmail.com on 20 Dec 2010 at 4:47

GoogleCodeExporter commented 9 years ago
hi there and thanks for helping, the patch looks ok to me and has been applied

a newer version (0.3.3) will be published soon

Original comment by giulivo.navigante on 24 Dec 2010 at 12:50

GoogleCodeExporter commented 9 years ago

Original comment by giulivo.navigante on 24 Dec 2010 at 1:27