Index: 0.11dev/session_patch.diff =================================================================== --- 0.11dev/session_patch.diff (revision 3515) +++ 0.11dev/session_patch.diff (working copy) @@ -1,7 +1,7 @@ -Index: session.py +Index: trac/web/session.py =================================================================== ---- session.py (revision 5898) -+++ session.py (working copy) +--- trac/web/session.py (revision 6815) ++++ trac/web/session.py (working copy) @@ -23,6 +23,21 @@ from trac.util import hex_entropy from trac.util.html import Markup @@ -84,9 +84,9 @@ + if ldap_user: + try: + ldap_name = '' -+ ldap_name = str(getattr(ldap_user,get_name_from_ldap_userattribute)).strip() ++ ldap_name = unicode(getattr(ldap_user,get_name_from_ldap_userattribute)).strip() + if ldap_name != '': -+ self.env.log.info("Found name for user via LDAP: %s -> %s" % (str(sid), str(ldap_name))) ++ self.env.log.info("Found name for user via LDAP: %s -> %s" % (str(sid), unicode(ldap_name))) + self['name'] = ldap_name + _needsave = True + except AttributeError, e: Index: 0.11dev/session.py =================================================================== --- 0.11dev/session.py (revision 3515) +++ 0.11dev/session.py (working copy) @@ -154,9 +154,9 @@ if ldap_user: try: ldap_name = '' - ldap_name = str(getattr(ldap_user,get_name_from_ldap_userattribute)).strip() + ldap_name = unicode(getattr(ldap_user,get_name_from_ldap_userattribute)).strip() if ldap_name != '': - self.env.log.info("Found name for user via LDAP: %s -> %s" % (str(sid), str(ldap_name))) + self.env.log.info("Found name for user via LDAP: %s -> %s" % (str(sid), unicode(ldap_name))) self['name'] = ldap_name _needsave = True except AttributeError, e: Index: 0.11dev/README =================================================================== --- 0.11dev/README (revision 3515) +++ 0.11dev/README (working copy) @@ -9,7 +9,7 @@ ==== DEPENDENCIES ==== * pywin32 (http://sourceforge.net/projects/pywin32/) * active_directory (http://tgolden.sc.sabren.com/python/active_directory.html) -* Trac 0.11dev-r5883 or newer (might work with lower revs, but this is what I tested on); +* Trac 0.11dev-r6685 or newer (might work with lower revs, but this is what I tested on); NOTE: this patch adds module-level imports in session.py for the two required modules, pywin32 and active_directory. These imports @@ -22,7 +22,7 @@ 1) install the required modules: pywin32 and active_directory 2) Apply the file patch session_patch.diff to your existing /trac/web/session.py (or just copy (and rename) the provided - session_full.py over your existing /trac/web/session.py -- BACKUP + session.py over your existing /trac/web/session.py -- BACKUP YOUR ORIGINAL FIRST!!) 3) Modify your trac.ini file [session] section (see the included trac.ini.sample):