Bug 1396490

Summary: ldap user cannot login when email has an apostrophe character
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: ApplianceAssignee: Tim Wade <twade>
Status: CLOSED ERRATA QA Contact: Matt Pusateri <mpusater>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.6.0CC: abellott, benglish, cbudzilo, cpelland, dajohnso, gblomqui, gtanzill, jhardy, obarenbo, simaishi, twade
Target Milestone: GAKeywords: ZStream
Target Release: 5.6.4   
Hardware: x86_64   
OS: Linux   
Whiteboard: ldap
Fixed In Version: 5.6.4.0 Doc Type: Release Note
Doc Text:
This update adds login support for user email addresses containing apostrophes.
Story Points: ---
Clone Of: 1379420 Environment:
Last Closed: 2017-03-09 17:04:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On: 1379420    
Bug Blocks:    

Comment 2 CFME Bot 2016-12-13 18:26:09 UTC
New commit detected on ManageIQ/manageiq/darga:
https://github.com/ManageIQ/manageiq/commit/b913c33bdcad5bc30ae8f280fda3cc0bb27c4ebb

commit b913c33bdcad5bc30ae8f280fda3cc0bb27c4ebb
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Thu Nov 17 17:21:11 2016 -0500
Commit:     Oleg Barenboim <chessbyte>
CommitDate: Tue Dec 13 13:21:12 2016 -0500

    Merge pull request #12729 from imtayadeway/fix/email-validation
    
    Allow apostrophes in email address
    (cherry picked from commit f728774fb1db4c4e48246f27dbb9f0f50a4162d8)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1396490

 app/models/user.rb       | 2 +-
 spec/models/user_spec.rb | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

Comment 3 Matt Pusateri 2017-02-15 18:52:37 UTC
While the original patch does indeed make authentication work. There is still a condition that creates two users in the database/webui.


Setup external auth, enable it as the mode. Log in as the UID of the LDAP user, user will show up under Users in UI.  Logout and login with email address of the user. another duplicate user will be created, when in fact they are the same user.

Comment 4 Matt Pusateri 2017-02-15 19:51:44 UTC
Actually, logging in with the email address fails to match the user's group, so it doesn't duplicate the user like in 5.7.1.1. But, still only partially fixed.

Comment 5 Dave Johnson 2017-02-17 20:32:34 UTC
Opened bug 1424620 to cover comment 3 and 4.

This needs some doctext around it

Comment 8 errata-xmlrpc 2017-03-09 17:04:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0474.html