At the end of RegistrationTool.py is _checkEmail, a function for validating email addresses:


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:

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.



Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to