You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@allura.apache.org by Dave Brondsema <da...@brondsema.net> on 2015/04/06 17:46:11 UTC

[allura:tickets] #7856 Error looking up user by email address when email is invalid

- **labels**:  --> sf-current, sf-1
- **Comment**:

Simple fix could be for `canonical` to return the provided email address if it isn't an expected format (too many `@`s)



---

** [tickets:#7856] Error looking up user by email address when email is invalid**

**Status:** open
**Milestone:** unreleased
**Labels:** sf-current sf-1 
**Created:** Wed Mar 18, 2015 02:06 PM UTC by Dave Brondsema
**Last Updated:** Mon Mar 30, 2015 02:01 PM UTC
**Owner:** nobody

With an author header like this: `Author: foobar@gmail.com <fo...@a9fa2536-c6e1-c3a1-1ef2-e4143cdeeb22>` you get this error:

~~~~
  File "/var/local/allura/Allura/allura/model/repository.py", line 943, in authored_user
    return User.by_email_address(self.authored.email)
  File "/var/local/allura/Allura/allura/model/auth.py", line 647, in by_email_address
    addrs = EmailAddress.find(dict(email=addr, confirmed=True))
  File "/var/local/allura/Allura/allura/model/auth.py", line 144, in find
    email = cls.canonical(q['email'])
  File "/var/local/allura/Allura/allura/model/auth.py", line 172, in canonical
    user, domain = addr.split('@')
ValueError: too many values to unpack
~~~~

This can cause a repo import to fail.  We should handle it better.


---

Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at https://forge-allura.apache.org/p/allura/admin/tickets/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.