Bug 454076
| 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> | ||||||||
| Severity: | high | Docs Contact: | |||||||||
| Priority: | low | ||||||||||
| Version: | unspecified | CC: | benl, dpal, jgalipea | ||||||||
| Target Milestone: | --- | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | freeipa-2.0.0-1.fc15 | Doc Type: | Bug Fix | ||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | Type: | --- | |||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Embargoed: | |||||||||||
| Bug Depends On: | |||||||||||
| Bug Blocks: | 453489 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Pavel Volkovitskiy
2008-07-04 13:05:20 UTC
Created attachment 311039 [details]
trace
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. 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 sure 1. yes via 1.1.1 web ui 2. firefox 3 on linux (utf8 locale) 3. i tried to use "Павел Волковицкий" 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'. 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 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) 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.
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. 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'.
master: bae3a2101fc3cf79cc90bd0f807de226aeb46f5e 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 |