SVN: CMF/branches/2.1/C - CMFDefault.utils: The email validation would reject addresses where
Jens Vagelpohl <[email protected]> Fri, 31 Aug 2007 13:05:54 -0400 (EDT)
| Newsgroups | gmane.comp.web.zope.cmf.cvs |
|---|---|
| Message-ID | <20070831170554.EA509203B20__29618.7794687741$1188579968$gmane$org@mail.zope.org> |
Log message for revision 79407:
- CMFDefault.utils: The email validation would reject addresses where
the domain part started with a single letter element.
(http://www.zope.org/Collectors/CMF/495)
Changed:
U CMF/branches/2.1/CHANGES.txt
U CMF/branches/2.1/CMFDefault/tests/test_utils.py
U CMF/branches/2.1/CMFDefault/utils.py
-=-
Modified: CMF/branches/2.1/CHANGES.txt
===================================================================
--- CMF/branches/2.1/CHANGES.txt 2007-08-31 16:24:37 UTC (rev 79406)
+++ CMF/branches/2.1/CHANGES.txt 2007-08-31 17:05:54 UTC (rev 79407)
@@ -2,6 +2,10 @@
Bug Fixes
+ - CMFDefault.utils: The email validation would reject addresses where
+ the domain part started with a single letter element.
+ (http://www.zope.org/Collectors/CMF/495)
+
- Fixed a bug in the site manager creation code, which would assign the
__parent__ pointer to the Aq-wrapper and not the actual object. Also
prevented the getMainGlobals script to fail if not content-type header
@@ -11,6 +15,7 @@
as StateChangeInfo passes on the new status to after-transition scripts.
(http://www.zope.org/Collectors/CMF/490)
+
CMF 2.1.0 (2007/08/08)
New Features
Modified: CMF/branches/2.1/CMFDefault/tests/test_utils.py
===================================================================
--- CMF/branches/2.1/CMFDefault/tests/test_utils.py 2007-08-31 16:24:37 UTC (rev 79406)
+++ CMF/branches/2.1/CMFDefault/tests/test_utils.py 2007-08-31 17:05:54 UTC (rev 79407)
@@ -258,6 +258,8 @@
self.assertEqual(checkEmailAddress('[email protected]'), None)
# CMF Collector issue #401
self.assertEqual(checkEmailAddress("user'[email protected]"), None)
+ # CMF Collector issue #495
+ self.assertEqual(checkEmailAddress("[email protected]"), None)
self.assertRaises(EmailAddressInvalid, checkEmailAddress,
'this is not an e-mail address')
self.assertRaises(EmailAddressInvalid, checkEmailAddress,
Modified: CMF/branches/2.1/CMFDefault/utils.py
===================================================================
--- CMF/branches/2.1/CMFDefault/utils.py 2007-08-31 16:24:37 UTC (rev 79406)
+++ CMF/branches/2.1/CMFDefault/utils.py 2007-08-31 17:05:54 UTC (rev 79407)
@@ -513,7 +513,7 @@
# RFC 2821 domain: sequence of dot-separated labels
# characters allowed in label: A-Za-z0-9-, first is a letter
# Even though the RFC does not allow it all-numeric domains do exist
-_DOMAIN_RE = re.compile(r'[^@]{1,64}@[A-Za-z0-9][A-Za-z0-9-]+'
+_DOMAIN_RE = re.compile(r'[^@]{1,64}@[A-Za-z0-9][A-Za-z0-9-]*'
r'(\.[A-Za-z0-9][A-Za-z0-9-]*)+$')
security.declarePublic('checkEmailAddress')