[PATCH] = considered a valid character in email address but causing problems with certificates
|Reported by:||Owned by:|
Description (last modified by )
Notification module (
trac/notification.py) uses a regular expression
EMAIL_LOOKALIKE_PATTERN to extract email from connection name, if any is defined. For the email local part, the valid characters include in particular
=. This is may be valid from a RFC point of view but I have never seen it used in an email address local part and this is causing problems with certificates whose DN contains the attribute
/emailAddress=.... In this case, an email address is found in the connection name (which in principle is fine) but the email address extracted is
emailAddress=... instead of the email itself.
For example the DN of my certificate is:
and results in notifications to be sent to
emailAddressemail@example.com instead of
firstname.lastname@example.org which obviously results in a failure.
This is a major problem if a user with such a connection name tries to define its email address in the preferences. In this case, he will not be able to connect to the project until the session attributes are removed from the database.
If removal of
= from valid characters is considered acceptable an easy fix is:
29 29 MAXHEADERLEN = 76 30 30 EMAIL_LOOKALIKE_PATTERN = ( 31 31 # the local part 32 r"[a-zA-Z0-9.' =+_-]+" '@' 32 r"[a-zA-Z0-9.'+_-]+" '@' 33 33 # the domain name part (RFC:1035) 34 34 '(?:[a-zA-Z0-9_-]+\.)+' # labels (but also allow '_') 35 35 '[a-zA-Z](?:[-a-zA-Z\d]*[a-zA-Z\d])?' # TLD
Change History (11)
comment:1 by , 12 years ago
|Summary:||= considered a valid character in email address but causing problems with certificates → [PATCH] = considered a valid character in email address but causing problems with certificates|