Project

General

Profile

Actions

Bug #18442

open

Validation failed: Email address is invalid when adding IPA user with more than one email

Added by Daniel Lobato Garcia over 7 years ago. Updated over 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Authentication
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1293443
Description of problem:
When using IPA/IdM authentication and the user has more than one email address, the user is not created and the following error message appears:

ActiveRecord::RecordInvalid
Validation failed: Email address is invalid
app/models/user.rb:253:in `block in find_or_create_external_user'
app/models/concerns/foreman/thread_session.rb:73:in `as'
app/models/concerns/foreman/thread_session.rb:79:in `as_anonymous_admin'
app/models/user.rb:251:in `find_or_create_external_user'
app/services/sso/apache.rb:38:in `authenticated?'
app/controllers/users_controller.rb:68:in `login'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'

Version-Release number of selected component (if applicable):

How reproducible:
Always

Steps to Reproduce:
1. ipa user-add --first=Hans --last=Wurst --email= --email= hwurst
2. Log in to the WebUI

Actual results:
User not created

Expected results:
User created

Additional info:
Workaround: Remove all but a single email address from the user, log in to create the user and add the additional email addresses again.

Actions #1

Updated by Dominic Cleal over 7 years ago

  • Category set to Authentication

Is this when using mod_lookup_identity? Which version? Ensure you're on 0.9.0.

The module should be configured to only pass a single value of the attribute through to Foreman (at least from that version), so if values are getting concatenated then I think it's either a bug there or misconfigured.

Else more information would be useful to see what the email field and environment variables are set to.

Actions

Also available in: Atom PDF