Modify

Opened 6 years ago

Closed 6 years ago

#4628 closed defect (fixed)

Encoding errors with SessionStore and unicode (patch given)

Reported by: anonymous Owned by: mgood
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 6 years ago by mgood

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.