[Zope-CMF] [dev] _checkEmail issues
yuppie
y.2006_ at wcm-solutions.de
Fri Oct 20 09:39:23 EDT 2006
Hi!
At the end of RegistrationTool.py is _checkEmail, a function for
validating email addresses:
http://svn.zope.org/CMF/trunk/CMFDefault/RegistrationTool.py?rev=70840&view=markup
AFAICS the checks performed by that function are too restrictive. These
are the tests I don't agree with:
Test a: characters allowed on local-part: 0-9a-Z-._+'
-----------------------------------------------------
RFC 2822 allows a dot-atom with these characters:
a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~
At least all these characters should be allowed, even more characters
are valid within quoted-strings.
Test b: must start or end with alpha or num
-------------------------------------------
Why? Can we remove that test?
Test c: local-part must end with alpha or num or _
--------------------------------------------------
Why? Can we remove that test?
Test e and f: pairs of '.', '-' and '_' not allowed
---------------------------------------------------
Why in local-part? Can we limit this to the domain part?
Test g: domain must end with '.' plus 2, 3 or 4 alpha
-----------------------------------------------------
There are new TLDs like '.museum' with more than 4 characters. Do we
need this test?
Please let me know if you think I'm missing something. I'd like to fix
these issues and move the code to CMFDefault.utils.
Cheers,
Yuppie
More information about the Zope-CMF
mailing list