#21248: Password tests failure on Django 1.5 (bcrypt related) ------------------------------+-------------------- Reporter: akaariai | Owner: nobody Type: Bug | Status: new Component: contrib.auth | Version: 1.5 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 ------------------------------+-------------------- I get this failure when running Django's test suite on stable/1.5.x (at commit f8393edb52e3dc73185f2496bfa08463fa4ffa09): {{{ ====================================================================== ERROR: test_bcrypt (django.contrib.auth.tests.hashers.TestUtilsHashPass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/akaariai/Programming/py27_venv/local/lib/python2.7/site- packages/django/contrib/auth/tests/hashers.py", line 100, in test_bcrypt self.assertTrue(check_password('lètmein', encoded)) File "/home/akaariai/Programming/py27_venv/local/lib/python2.7/site- packages/django/contrib/auth/hashers.py", line 55, in check_password is_correct = hasher.verify(password, encoded) File "/home/akaariai/Programming/py27_venv/local/lib/python2.7/site- packages/django/contrib/auth/hashers.py", line 293, in verify return constant_time_compare(data, bcrypt.hashpw(force_bytes(password), data)) File "/home/akaariai/Programming/py27_venv/local/lib/python2.7/site- packages/bcrypt/__init__.py", line 91, in hashpw raise TypeError("Unicode-objects must be encoded before hashing") TypeError: Unicode-objects must be encoded before hashing }}}
The failure happens only when bcrypt is installed. Tested bcrypt 1.0.0-1.0.2. The failure happens both on Python 2.7 and 3.2. It seems the error is there in first 1.5 release, too. The error isn't present in 1.6.x. -- Ticket URL: <https://code.djangoproject.com/ticket/21248> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/051.1b7e21793a04b1598c0a2f5d0fd33f5b%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.