|Summary:||can't edit user win non-ascii letters in name|
|Product:||[Retired] freeIPA||Reporter:||Pavel Volkovitskiy <olfway>|
|Component:||WebUI||Assignee:||Rob Crittenden <rcritten>|
|Status:||CLOSED ERRATA||QA Contact:||Chandrasekar Kannan <ckannan>|
|Version:||unspecified||CC:||benl, dpal, jgalipea|
|Fixed In Version:||freeipa-2.0.0-1.fc15||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:|
Description Pavel Volkovitskiy 2008-07-04 13:05:20 UTC
i use 1.1.1 version i added user with russian letters in name now if i try to edit that user in web interface i have http 500 error and trace in log
Comment 2 Rob Crittenden 2008-07-07 14:25:13 UTC
Jason, does this seem right? I think we need to add kid.encoding="utf-8" to /usr/share/ipa/ipagui/config/app.cfg The kid templates themselves already list utf-8 as the charset but I think the above is needed for the controllers.
Comment 3 Jason Gerard DeRose 2008-07-07 20:16:30 UTC
Pavel, If you don't mind, I could use a bit more information: 1) Did you add the user through the web UI? And was this user added using 1.1.1? 2) What browser and version are you using? 3) What is the user name you are trying to use? I should have this figured out shortly. Cheers, Jason
Comment 4 Pavel Volkovitskiy 2008-07-08 15:57:59 UTC
sure 1. yes via 1.1.1 web ui 2. firefox 3 on linux (utf8 locale) 3. i tried to use "Павел Волковицкий"
Comment 5 Rob Crittenden 2008-07-22 15:22:50 UTC
This only affects the forms that we manually load using widgets.meta.load_kid_template(). The code path manages to elude every single place in the TurboGears kid support where the encoding would be set so it uses the python default encoding (sys.getdefaultencoding()) which is 'ascii'.
Comment 6 Pavel Volkovitskiy 2008-07-22 16:09:52 UTC
i can make it work if i change 'ascii' to 'utf-8' in /usr/lib/python2.5/site.py:def setencoding(): encoding = 'ascii' but that's not proper fix
Comment 7 Rob Crittenden 2008-07-22 16:15:47 UTC
Right. I'm working on a patch that will load the forms templates with the proper encoding (and it should honor kid.encoding in app.cfg)
Comment 8 Rob Crittenden 2008-07-22 16:34:25 UTC
Created attachment 312362 [details] trace of adding a group with non-ascii characters I an attempt to be thorough I tested adding a group with Павел in the description and it failed in ldapobject.py. So a different but related problem.
Comment 9 Rob Crittenden 2008-07-22 17:09:56 UTC
Ok, the problem above wasn't that the description contained non-ascii values but that the name of the group did. There appears to be an issue handling items that are part of the DN that are not ascii.
Comment 10 Rob Crittenden 2008-07-22 19:30:23 UTC
Created attachment 312388 [details] patch to fix template encoding We used to manually load the template files for the edit pages using turbogears.meta.load_kid_template(). Unfortunately this went through the one code path where encoding was completely ignored. It ended up defaulting to sys.getdefaultencoding() which is 'ascii'. So even though most of the templates are loaded as 'utf-8' the few that really mattered weren't. The fix is to call kid.load_template() ourselves and set the encoding of the class we just loaded to either the setting in the app.cfg file or to the normal default value of 'utf-8'.
Comment 11 Rob Crittenden 2008-07-29 15:33:26 UTC
Comment 12 Jenny Galipeau 2008-11-25 13:33:57 UTC
fix verified: USER [root@jennyv3 sysrestore]# ipa-adduser tester2 First name: Павел Last name: Волковицкий tester2 successfully added [root@jennyv3 sysrestore]# ipa-finduser tester2 First Name: 0J/QsNCy0LXQuw== Last Name: 0JLQvtC70LrQvtCy0LjRhtC60LjQuQ== Home Directory: /home/tester2 Login Shell: /bin/bash Login: tester2 GROUP [root@jennyv3 sysrestore]# ipa-addgroup mygroup Description: Павел mygroup successfully added