I have the same concerns as the original poster. I ended up with the attached patch, defining the attributes that may be flattened (i.e. converted from a one-value list to a string) in a "who.ini". I think this may be a safer way, rather than doing it for any attribute (especially considering that already deployed applications may expect the current behaviour). With the attached patch, the current behaviour is not changed, unless the application is configured otherwise.
I have the same concerns as the original poster. I ended up with the attached patch, defining the attributes that may be flattened (i.e. converted from a one-value list to a string) in a "who.ini". I think this may be a safer way, rather than doing it for any attribute (especially considering that already deployed applications may expect the current behaviour). With the attached patch, the current behaviour is not changed, unless the application is configured otherwise.
For example, in a who.ini, I have this::
[plugin: ldap_attributes ] who.plugins. ldap:LDAPAttrib utesPlugin attributes = cn,uid
use = repoze.
ldap_connection = ldap://localhost
attributes = cn,uid
flatten_
... because I happen to know that all users have only one common name and UID.
If this idea is accepted, I'll write tests for it, too.