Opened 15 years ago
Last modified 12 years ago
#8356 closed defect
Email address in user preferences is not honored when user name contains an "@" — at Version 2
Reported by: | Robert Widhopf-Fenk | Owned by: | Emmanuel Blot |
---|---|---|---|
Priority: | normal | Milestone: | 1.0 |
Component: | notification | Version: | 0.11.1 |
Severity: | major | Keywords: | consider, patch |
Cc: | lists@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
We are using http://modauthkerb.sourceforge.net/ for single sign on and this generates user names of the form USER@REALM. Users have set their email addresses in the preferences, but they are not used as the user name already contains an "@" and is considered as an email address.
The following patch against 0.11.1 changes the code to honor the email address if one is given and to do the other guessing only if there is none.
-
notification.
old new 277 277 return False 278 278 return True 279 279 280 if not is_email(address): 281 if address == 'anonymous': 280 if address == 'anonymous': 281 return None 282 283 if self.email_map.has_key(address): 284 address = self.email_map[address] 285 elif not is_email(address) and NotifyEmail.nodomaddr_re.match(address): 286 if self.config.getbool('notification', 'use_short_addr'): 287 return address 288 domain = self.config.get('notification', 'smtp_default_domain') 289 if domain: 290 address = "%s@%s" % (address, domain) 291 else: 292 self.env.log.info("Email address w/o domain: %s" % address) 282 293 return None 283 if self.email_map.has_key(address):284 address = self.email_map[address]285 elif NotifyEmail.nodomaddr_re.match(address):286 if self.config.getbool('notification', 'use_short_addr'):287 return address288 domain = self.config.get('notification', 'smtp_default_domain')289 if domain:290 address = "%s@%s" % (address, domain)291 else:292 self.env.log.info("Email address w/o domain: %s" % address)293 return None294 294 295 295 mo = self.shortaddr_re.search(address) 296 296 if mo:
Change History (2)
comment:1 by , 15 years ago
Summary: | Email addressin user preferences are not honored when user name looks like an email addess → Email address in user preferences is not honored when user name contains an "@" |
---|
comment:2 by , 15 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.