#28796: urlsafe_base64_encode broken on Django 2.0
-----------------------------------------+------------------------
               Reporter:  Nick           |          Owner:  nobody
                   Type:  Uncategorized  |         Status:  new
              Component:  Uncategorized  |        Version:  2.0
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 Suppose we have:

 hashed_msg = hmac.new(key, msg=message, digestmod=sha384)
 url = urlsafe_base64_encode(hashed.digest())

 Now url is a bytes object, say b'asdfwerqwefa'. In django 1.11, bytes-like
 objects could be placed in urls no problem, creating (say)
 localhost:8000/asdfwerqwefa

 However, in django 2.0, the url becomes (say)

 localhost:8000/b'asdfwerqwefa'

 which seems less 'urlsafe', as the quotes and the 'b' are added into the
 url. Shouldn't urlsafe_base64_encode now return a string, if bytes in urls
 now retain the quotes?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28796>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/053.1c1dc7693cb42fc8847658044fed3e8f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to