Merge lp://qastaging/~dreis-pt/ocb-addons/7.0-bug1079476-dr into lp://qastaging/ocb-addons

Proposed by Daniel Reis
Status: Work in progress
Proposed branch: lp://qastaging/~dreis-pt/ocb-addons/7.0-bug1079476-dr
Merge into: lp://qastaging/ocb-addons
Diff against target: 21 lines (+2/-2)
1 file modified
auth_ldap/users_ldap.py (+2/-2)
To merge this branch: bzr merge lp://qastaging/~dreis-pt/ocb-addons/7.0-bug1079476-dr
Reviewer Review Type Date Requested Status
Stefan Rijnhart (Opener) Needs Fixing
OpenERP Community Backports Pending
Review via email: mp+186394@code.qastaging.launchpad.net
To post a comment you must log in.
Revision history for this message
Daniel Reis (dreis-pt) wrote :

I need to add that I'm using this fix in production.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi Daniel, thanks for looking into this!

What I read on the Internet about python-ldap and unicode confirms what Olivier Dony writes on the bug report [1]. Any input that is passed on to python-ldap should be encoded as utf-8 instead of the default Python unicode. I can confirm this simply by logging on using a user name with a unicode character. This gives basically the same error as the one from the bug report. I think it would be much appreciated if you completed the mission to cover all strings passed to the LDAP server.

Code nit in l.18: given that the 'conf' dictionary comes from a raw sql query, it could be that conf['ldap_password'] is None. The following is probably safer in that case

    (conf['ldap_password'] or '').encode("utf-8")

[1] https://bugs.launchpad.net/openobject-addons/+bug/1079476/comments/5

review: Needs Fixing
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Setting to work-in-progress after 5 weeks of no response. Can you backport your fix to openobject-addons when you are happy with it?

Revision history for this message
Daniel Reis (dreis-pt) wrote :

Yes, I'll get back to it as soon as I can; just been too busy lately.

Unmerged revisions

9511. By Daniel Reis

Fix bug 1079476

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.