Modify

Opened 15 years ago

Closed 15 years ago

#4628 closed defect (fixed)

Encoding errors with SessionStore and unicode (patch given)

Reported by: anonymous Owned by: Matt Good
Priority: normal Component: AccountManagerPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Thanks for the fixed of #2327 and It works now.

I found another similar bug in SessionStore with the unicode username. they can not login with unicode username.

Here is my patch:

change pwhash.py

def _encode(*args):
    return [a.encode('utf-8') for a in args]

=>

def _encode(*args):
    return [a for a in args]

and

def htdigest(user, realm, password):
    p = ':'.join([user, realm, password])
    return md5.new(p).hexdigest()

=>

def htdigest(user, realm, password):
    p = ':'.join([user, realm, password])
    return md5.new(p.encode('utf-8')).hexdigest()

It works for me, but please check if the changes are all right.

Attachments (0)

Change History (1)

comment:1 Changed 15 years ago by Matt Good

Resolution: fixed
Status: newclosed

(In [5273]) fix SessionStore unicode errors due to double-escaping in htdigest hash method (fixes #4628)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Matt Good.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.