Skip to content

Commit

Permalink
Email addresses are case-insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
fluffy-critter committed Aug 27, 2020
1 parent 17a5598 commit da35bf0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion authl/handlers/email_addr.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def handles_url(self, url):
return None

if validate_email.validate_email(address):
return 'mailto:' + address
return 'mailto:' + address.lower()

return None

Expand Down
2 changes: 2 additions & 0 deletions tests/handlers/test_emailaddr.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ def test_basics():

assert handler.handles_url('mailto:foo@example.com?subject=pwned') == 'mailto:foo@example.com'

assert handler.handles_url('MailtO:Foo@Example.Com') == 'mailto:foo@example.com'


def test_success():
store = {}
Expand Down

0 comments on commit da35bf0

Please sign in to comment.