# HG changeset patch # User Alexandre Fayolle # Date 1285678365 -7200 # Node ID eb79fb69c2b23676d1e39d3b61e3e057320786d2 # Parent 74575fb32a4dbea94a34ebdb5e61a6dcccb25226 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). diff -r 74575fb32a4d -r eb79fb69c2b2 server/serverctl.py --- a/server/serverctl.py Tue Sep 28 12:22:17 2010 +0200 +++ b/server/serverctl.py Tue Sep 28 14:52:45 2010 +0200 @@ -501,7 +501,7 @@ passwdmsg='new password for %s' % adminlogin) try: cursor.execute("UPDATE cw_CWUser SET cw_upassword=%(p)s WHERE cw_login=%(l)s", - {'p': crypt_password(passwd), 'l': adminlogin}) + {'p': buffer(crypt_password(passwd)), 'l': adminlogin}) sconfig = Configuration(options=USER_OPTIONS) sconfig['login'] = adminlogin sconfig['password'] = passwd