#31719: Remaining data.decode('ascii') @ hashers.py, but data is a str
-------------------------------------+-------------------------------------
Reporter: Marcel Nogueira d' | Owner: nobody
Eurydice |
Type: Bug | Status: closed
Component: contrib.auth | Version: 3.0
Severity: Normal | Resolution: invalid
Keywords: string, decode, | Triage Stage:
python3 | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):
* status: new => closed
* resolution: => invalid
Comment:
`bcrypt.hashpw` returns `bytes` (and not `str`) which do have a `.decode`
method and it's usage is necessary for the string interpolation into
`"%s$%s"` to work properly.
{{{#!python
>>> import bcrypt
>>> type(bcrypt.hashpw(b'password', bcrypt.gensalt()))
bytes
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31719#comment:1>
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/062.1bdf9a2e3a022590b4ae2b16ba78bfdd%40djangoproject.com.