[Product-Developers] LDAPMultiPlugins developers: please read this - possible localization problem

Alberto Lopes alberto at alopes.com
Mon Aug 25 21:17:00 UTC 2008


Wichert,

Here I am reporting my last progresses on the matter :working::

Like we discussed on the weekend, the group-wise role assignment was broken
by my change (Plone was unable to figure out whether a user was a member of
a group - the groupwise local role assignment was not working).

I rolled back the changes I made on ActiveDirectoryMultiPlugin.py (changed
the "x.split(';')" back to "x.split(',')", and the behavior of the site went
back to the same as before: whenever a user was a member of a group whose CN
had accented chars, that user got a UnicodeDecodeError as soon as they
logged in. If the user had no such groups, the site worked okay. The
groupwise local role assignment was working again though.

I made then two more tests: tested removing the "accented-CN" group from a
user and asked them to access the site: the site worked; then put the user
back into the "accented-CN" group and asked them to access the site: the
site didn't work, with the UnicodeDecodeError traceback being displayed
instead of the homepage.

The second test was to ask the user with problems to access the site after I
cleared the "Groups (getGroupsForPrincipal)" checkbox at the Activate tab
for the AD plugin in ZMI. The site worked, and stopped working after I
checked that option again.

So, my partial solution, for the moment, to allow those users to access the
site, was to deactivate the Groups interface for the AD plugin. At this
moment, no Plone roles assigned to groups are working, only the ones
assigned to particular users.

I am partially satisfied that, with your help, I was able to isolate the
problem: the source might be elsewhere (that would explain why the problem
started to appear suddenly), but it seems to affect the
getGroupsForPrincipal method. Also, it is related to the fact that the group
CN has accented (i.e. non-ascii) characters.

One possible solution that came to my mind is to "filter out" the accented
chars from both the groups returned by getGroupsForPrincipal and the groups
returned by the group search made at the sharing tab (enumerateGroups method
perhaps?).  The "filter out" would be something like what Plone does when it
decides on a short name for an object based on a title that might contain
spaces, accented or otherwise weird characters.

Do you think that might work and might be feasible to implement? If not, do
you have another suggestion I might think of in terms of strategy?

Regards,

Alberto

-- 
View this message in context: http://n2.nabble.com/LDAPMultiPlugins-developers%3A-please-read-this---possible-localization-problem-tp777592p782501.html
Sent from the Product Developers mailing list archive at Nabble.com.





More information about the Product-Developers mailing list