Loading django/contrib/auth/management/commands/changepassword.py +2 −0 Original line number Diff line number Diff line from __future__ import unicode_literals import getpass from optparse import make_option Loading django/contrib/auth/tests/test_management.py +12 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,18 @@ class ChangepasswordManagementCommandTestCase(TestCase): with self.assertRaises(CommandError): command.execute("joe", stdout=self.stdout, stderr=self.stderr) def test_that_changepassword_command_works_with_nonascii_output(self): """ #21627 -- Executing the changepassword management command should allow non-ASCII characters from the User object representation. """ # 'Julia' with accented 'u': models.User.objects.create_user(username='J\xfalia', password='qwerty') command = changepassword.Command() command._get_pass = lambda *args: 'not qwerty' command.execute("J\xfalia", stdout=self.stdout) @skipIfCustomUser class CreatesuperuserManagementCommandTestCase(TestCase): Loading docs/releases/1.6.2.txt +3 −0 Original line number Diff line number Diff line Loading @@ -11,3 +11,6 @@ Bug fixes * Prevented the base geometry object of a prepared geometry to be garbage collected, which could lead to crash Django (#21662). * Fixed a crash when executing the :djadmin:`changepassword` command when the user object representation contained non-ASCII characters (#21627). Loading
django/contrib/auth/management/commands/changepassword.py +2 −0 Original line number Diff line number Diff line from __future__ import unicode_literals import getpass from optparse import make_option Loading
django/contrib/auth/tests/test_management.py +12 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,18 @@ class ChangepasswordManagementCommandTestCase(TestCase): with self.assertRaises(CommandError): command.execute("joe", stdout=self.stdout, stderr=self.stderr) def test_that_changepassword_command_works_with_nonascii_output(self): """ #21627 -- Executing the changepassword management command should allow non-ASCII characters from the User object representation. """ # 'Julia' with accented 'u': models.User.objects.create_user(username='J\xfalia', password='qwerty') command = changepassword.Command() command._get_pass = lambda *args: 'not qwerty' command.execute("J\xfalia", stdout=self.stdout) @skipIfCustomUser class CreatesuperuserManagementCommandTestCase(TestCase): Loading
docs/releases/1.6.2.txt +3 −0 Original line number Diff line number Diff line Loading @@ -11,3 +11,6 @@ Bug fixes * Prevented the base geometry object of a prepared geometry to be garbage collected, which could lead to crash Django (#21662). * Fixed a crash when executing the :djadmin:`changepassword` command when the user object representation contained non-ASCII characters (#21627).