[Python-checkins] CVS: python/dist/src/Lib smtpd.py,1.5,1.5.2.1

Anthony Baxter anthonybaxter@users.sourceforge.net
2001年12月04日 22:11:28 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv27439
Modified Files:
 Tag: release21-maint
	smtpd.py 
Log Message:
backport half of 1.11:
__getaddr(): Watch out for empty addresses that can happen when
something like "MAIL FROM:<CR>" is received. This avoids the
IndexError and rightly returns an SMTP syntax error.
Index: smtpd.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/smtpd.py,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -d -r1.5 -r1.5.2.1
*** smtpd.py	2001年04月15日 13:06:04	1.5
--- smtpd.py	2001年12月05日 06:11:26	1.5.2.1
***************
*** 207,211 ****
 if arg[:keylen].upper() == keyword:
 address = arg[keylen:].strip()
! if address[0] == '<' and address[-1] == '>' and address != '<>':
 # Addresses can be in the form <person@dom.com> but watch out
 # for null address, e.g. <>
--- 207,213 ----
 if arg[:keylen].upper() == keyword:
 address = arg[keylen:].strip()
! if not address:
! pass
! elif address[0] == '<' and address[-1] == '>' and address != '<>':
 # Addresses can be in the form <person@dom.com> but watch out
 # for null address, e.g. <>

AltStyle によって変換されたページ (->オリジナル) /