[CMF-checkins] SVN: CMF/branches/1.5/C -
CMFDefault.RegistrationTool: Adding single quotes to the allowed
Jens Vagelpohl
jens at dataflake.org
Sat Feb 18 09:33:55 EST 2006
Log message for revision 41664:
- CMFDefault.RegistrationTool: Adding single quotes to the allowed
characters in the local part of an email address.
(http://www.zope.org/Collectors/CMF/401)
Changed:
U CMF/branches/1.5/CHANGES.txt
U CMF/branches/1.5/CMFDefault/RegistrationTool.py
U CMF/branches/1.5/CMFDefault/tests/test_RegistrationTool.py
-=-
Modified: CMF/branches/1.5/CHANGES.txt
===================================================================
--- CMF/branches/1.5/CHANGES.txt 2006-02-18 13:57:52 UTC (rev 41663)
+++ CMF/branches/1.5/CHANGES.txt 2006-02-18 14:33:54 UTC (rev 41664)
@@ -2,6 +2,10 @@
Bug Fixes
+ - CMFDefault.RegistrationTool: Adding single quotes to the allowed
+ characters in the local part of an email address.
+ (http://www.zope.org/Collectors/CMF/401)
+
- CMFCore.FSPythonScript: FSPythonScripts forgot to add __file__ to
the script globals. This broke warnings.warn() when a stacklevel
argument pointing into the script was passed (2).
Modified: CMF/branches/1.5/CMFDefault/RegistrationTool.py
===================================================================
--- CMF/branches/1.5/CMFDefault/RegistrationTool.py 2006-02-18 13:57:52 UTC (rev 41663)
+++ CMF/branches/1.5/CMFDefault/RegistrationTool.py 2006-02-18 14:33:54 UTC (rev 41664)
@@ -217,7 +217,7 @@
# See URL: http://www.zopelabs.com/cookbook/1033402597
-_TESTS = ( ( re.compile("^[0-9a-zA-Z\.\-\_\+]+\@[0-9a-zA-Z\.\-]+$")
+_TESTS = ( ( re.compile("^[0-9a-zA-Z\.\-\_\+\']+\@[0-9a-zA-Z\.\-]+$")
, True
, "Failed a"
)
Modified: CMF/branches/1.5/CMFDefault/tests/test_RegistrationTool.py
===================================================================
--- CMF/branches/1.5/CMFDefault/tests/test_RegistrationTool.py 2006-02-18 13:57:52 UTC (rev 41663)
+++ CMF/branches/1.5/CMFDefault/tests/test_RegistrationTool.py 2006-02-18 14:33:54 UTC (rev 41664)
@@ -92,6 +92,21 @@
self.failUnless( result is None )
+ def test_testPropertiesValidity_email_with_singlequote( self ):
+
+ # CMF Collector #401
+
+ tool = self._makeOne().__of__( self.root )
+ self.root.portal_membership = FauxMembershipTool()
+
+ props = { 'email' : "user'site at example.com"
+ , 'username' : 'username'
+ }
+
+ result = tool.testPropertiesValidity( props, None )
+
+ self.failUnless( result is None )
+
def test_testPropertiesValidity_new_invalid_email( self ):
tool = self._makeOne().__of__( self.root )
More information about the CMF-checkins
mailing list