New submission from Marcus CM <[EMAIL PROTECTED]>: The __getaddr does not handle certain valid MAIL FROM well :
For eg, <[EMAIL PROTECTED]> SIZE=7777 AUTH=<> would result in a mismatch of bracket handling. Suggested fix is :- def __getaddr(self, keyword, arg): address = None keylen = len(keyword) if arg[:keylen].upper() == keyword: address = arg[keylen:].strip() if not address: pass # Marcus fix : i = address.count("<") ii = address.count(">") if i != ii : address = None return address # Marcus remark : bug if : <[EMAIL PROTECTED]> SIZE=6092 AUTH=<> elif address[0] == '<' and address[-1] == '>' and address ! = '<>': # Addresses can be in the form <[EMAIL PROTECTED]> but watch out # for null address, e.g. <> if address.count("<") == 1 : address = address[1:-1] return address ---------- messages: 72763 nosy: [EMAIL PROTECTED] severity: normal status: open title: smtpd.py __getaddr insufficient handling versions: Python 2.6 _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3802> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com