Project

General

Profile

Actions

Bug #5811

closed

User email validation doesn't exactly match specification

Added by Dominic Cleal almost 10 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
Authentication
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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 2 (1 open1 closed)

Related to Foreman - Bug #12543: Email id with latin,utf-8 is not accepted while creating userClosedAmir Fefer11/19/2015Actions
Related to Foreman - Refactor #14641: Simplify e-mail address regexNew04/14/2016Actions
Actions

Also available in: Atom PDF