Project

General

Profile

Bug #5811

User email validation doesn't exactly match specification

Added by Dominic Cleal about 9 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
Authentication
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1070730
Description of problem:

hammer accepts invalid email addresses when creating users:

for example:
  1. hammer user create --auth-source-id 1 --password testing --login user1 --mail "specialchars():;@example.com"
    User created
  1. hammer user create --auth-source-id 1 --password testing --login user2 --mail 's p a c e '
    User created
  1. hammer user create --auth-source-id 1 --password testing --login user3 --mail ''
    User created
  1. hammer user list
    ID | LOGIN | NAME | EMAIL
    163 | user1 | | specialchars():;@example.com
    165 | user2 | |
    166 | user3 | |
and it also accepts empty string as email address:
  1. hammer user create --login user4 --mail '' --auth-source-id 1 --password pass
    User created
and does not accept (unusual) valid addresses (see http://en.wikipedia.org/wiki/Email_address#Valid_email_addresses):
e.g.:
  1. hammer user create --login user5 --mail '"very.unusual.@.unusual.com"@example.com' --auth-source-id 1 --password pass
    Could not create the user:
    Email address is invalid

Version-Release number of selected component (if applicable):
foreman-postgresql-1.5.0-0.develop.201402250936git8cf1033.el6.noarch
foreman-release-1.5.0-0.develop.201402250936git8cf1033.el6.noarch
dell-pem710-01.rhts.eng.bos.redhat.com-foreman-proxy-1.0-1.noarch
foreman-proxy-1.5.0-0.develop.201402201704gita25e7b9.el6.noarch
dell-pem710-01.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch
rubygem-foreman_api-0.1.11-1.el6.noarch
foreman-1.5.0-0.develop.201402250936git8cf1033.el6.noarch
rubygem-hammer_cli_foreman-0.0.18-1.el6.noarch
foreman-selinux-1.5.0-0.develop.201401221845git5f25c33.el6.noarch
rubygem-hammer_cli-0.0.18-1.el6.noarch
rubygem-hammer_cli_katello-0.0.3-1.el6.noarch

How reproducible:
always


Related issues

Related to Foreman - Bug #12543: Email id with latin,utf-8 is not accepted while creating userClosed2015-11-19
Related to Foreman - Refactor #14641: Simplify e-mail address regexNew2016-04-14

Associated revisions

Revision bd6b4271 (diff)
Added by Christine Fouant over 8 years ago

fixes #5811 - Validates emails to RFC 5322 specification

History

#1 Updated by Dominic Cleal about 9 years ago

  • Category set to Authentication

#2 Updated by The Foreman Bot over 8 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 1.7.3
  • Pull request https://github.com/theforeman/foreman/pull/1776 added

#3 Updated by Daniel Lobato Garcia over 8 years ago

  • Legacy Backlogs Release (now unused) set to 21

#4 Updated by Christine Fouant over 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Dominic Cleal over 7 years ago

  • Related to Bug #12543: Email id with latin,utf-8 is not accepted while creating user added

#6 Updated by Dominic Cleal about 7 years ago

Also available in: Atom PDF