diff options
| author | John Paulett <john@paulett.org> | 2014-03-31 16:35:45 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-04-10 13:15:37 -0400 |
| commit | b5a9166f7e0e21ae0f2cc8f218b422bc2c116fb0 (patch) | |
| tree | ba6f6f79330e395426d39930c0a044ff34657339 | |
| parent | ea5a98470467d5a53f10caf77510c77504f733dd (diff) | |
Fixed #22364 -- Sanitized getpass input in changepassword.
Python 2 getpass on Windows does not accept unicode, even
when containing on ASCII characters. Related #190807.
| -rw-r--r-- | django/contrib/auth/management/commands/changepassword.py | 3 | ||||
| -rw-r--r-- | docs/releases/1.6.3.txt | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/django/contrib/auth/management/commands/changepassword.py b/django/contrib/auth/management/commands/changepassword.py index 4d6ae60acd..97a0a32fc0 100644 --- a/django/contrib/auth/management/commands/changepassword.py +++ b/django/contrib/auth/management/commands/changepassword.py @@ -6,6 +6,7 @@ from optparse import make_option from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT_DB_ALIAS +from django.utils.encoding import force_str class Command(BaseCommand): @@ -18,7 +19,7 @@ class Command(BaseCommand): requires_system_checks = False def _get_pass(self, prompt="Password: "): - p = getpass.getpass(prompt=prompt) + p = getpass.getpass(prompt=force_str(prompt)) if not p: raise CommandError("aborted") return p diff --git a/docs/releases/1.6.3.txt b/docs/releases/1.6.3.txt index f2cf261290..538c67e5dc 100644 --- a/docs/releases/1.6.3.txt +++ b/docs/releases/1.6.3.txt @@ -64,5 +64,8 @@ Other bugfixes and changes environment variable wasn't set (`#22256 <http://code.djangoproject.com/ticket/22256>`_). +* Fixed :djadmin:`changepassword` on Windows + (`#22364 <https://code.djangoproject.com/ticket/22364>`_). + Additionally, Django's vendored version of six, :mod:`django.utils.six` has been upgraded to the latest release (1.6.1). |
