changeset 6351:eb79fb69c2b2 stable

make reset-admin-pwd work with sqlserver as db backend the pyodbc sqlserver db backend depends on being passed the cw_upassword value as a buffer object to bind it to a binary column (which is usually done when CW is dealing with passwords).
author Alexandre Fayolle <alexandre.fayolle@logilab.fr>
date Tue, 28 Sep 2010 14:52:45 +0200
parents 74575fb32a4d
children 2259d834d757
files server/serverctl.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/server/serverctl.py	Tue Sep 28 12:22:17 2010 +0200
     1.2 +++ b/server/serverctl.py	Tue Sep 28 14:52:45 2010 +0200
     1.3 @@ -501,7 +501,7 @@
     1.4                                         passwdmsg='new password for %s' % adminlogin)
     1.5          try:
     1.6              cursor.execute("UPDATE cw_CWUser SET cw_upassword=%(p)s WHERE cw_login=%(l)s",
     1.7 -                           {'p': crypt_password(passwd), 'l': adminlogin})
     1.8 +                           {'p': buffer(crypt_password(passwd)), 'l': adminlogin})
     1.9              sconfig = Configuration(options=USER_OPTIONS)
    1.10              sconfig['login'] = adminlogin
    1.11              sconfig['password'] = passwd