Bug #13125
closedWhen using danish letters in users first or lastname in ldap, user cannot login.
Description
Setup: Foreman using ldap integration.
To reporduce:
1. Create a user in ldap, with lastname containing special letters (latin1 danish letters æøå)
2. Try and login to foreman gui - Fails.
Workaround:
1. Change users names in ldap to only English letters.
2. Login to foreman.
3. Change users names in ldap to contain latin1 letters
4. Login to foreman.
5. Username now contains latin1 letters and is shown correctly in foreman gui.
Log when login fails:
Started POST "/users/login" for xxx.xxx.xxx.xxx at 2016-01-12 06:48:24 +0000
2016-01-12T06:48:24 [app] [I] Processing by UsersController#login as HTML
2016-01-12T06:48:24 [app] [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"xxxxxxxxx=", "login"=>{"login"=>"bob", "password"=>"[FILTERED]"}, "commit"=>"Login"}
2016-01-12T06:48:24 [sql] [I] Successfully decrypted field for AuthSourceLdap LDAP freeIPA
2016-01-12T06:48:24 [sql] [I] Failed to save User 'bob' ["Surname is invalid"]
2016-01-12T06:48:24 [sql] [I] invalid user
2016-01-12T06:48:24 [app] [I] Redirected to https://foreman.com/users/login