Opened 18 years ago

Closed 18 years ago

#4314 closed (fixed)

unicode-branch - non-ascii passwords don't work

Reported by: anonymous Owned by: Malcolm Tredinnick
Component: Internationalization Version: other branch
Severity: Keywords: unicode-branch, authorization
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

UnicodeEncodeError is thrown if an non-ascii password is set. This problem can be solved by the attached patch.

I realize that in python 2.4 only string argument can be used in methods md5.new and sha.new. In python 2.5 unicode argument is also acceptable.

Simple test:

#!/usr/bin/python
# encoding: UTF-8

from django.contrib.auth.models import User
User().set_password(u'příliš žlouťoučký kůň úpěl ďábelské ódy')

Attachments (2)

unicode-password.diff (2.1 KB ) - added by anonymous 18 years ago.
password.txt (43 bytes ) - added by anonymous 17 years ago.

Download all attachments as: .zip

Change History (4)

by anonymous, 18 years ago

Attachment: unicode-password.diff added

comment:1 by Malcolm Tredinnick, 18 years ago

Triage Stage: UnreviewedAccepted

Good fix. This will be forwards compatible, too, which is important.

comment:2 by Malcolm Tredinnick, 18 years ago

Resolution: fixed
Status: newclosed

(In [5269]) unicode: Fixed #4314 -- Allow non-ASCII characters in password strings.

by anonymous, 17 years ago

Attachment: password.txt added
Note: See TracTickets for help on using tickets.
Back to Top