#29179: format_html() can falsely interpret a strack trace as a str.format
replacement field
     Reporter:  Stephan Michaud      |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Utilities            |                  Version:  1.10
     Severity:  Normal               |               Resolution:
     Keywords:  format_html, string  |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0

Comment (by Stephan Michaud):

 Replying to [comment:2 Tim Graham]:
 > Could you give a minimal example that reproduces the issue (i.e. give
 the minimal string from the traceback and the arguments for

 Sure! Here's the string passed in to `format_html()`:
 <div class="ui-state-default ui-corner-all show_node"
 class="hidden_menu">Traceback (most recent call last):
 File "/home/tool/www/project/common/utils.py", line 52, in inner
 ret = func(*args, **kwargs)
 line 31, in handle
 File "/home/tool/www/project/common/abstract_models.py", line 289, in
 File "/home/tool/www/project/proxies/models.py", line 99, in
 File "/home/tool/www/project/proxies/models.py", line 254, in
 data = urllib.parse.urlencode({'request': self.get_serialized_data()})
 File "/home/tool/www/project/proxies/models.py", line 216, in
 'useragent': self.request_useragent,
 File "/home/tool/venv/lib/python3.5/base64.py", line 59, in b64encode
 encoded = binascii.b2a_base64(s)[:-1]
 TypeError: a bytes-like object is required, not 'str'

Ticket URL: <https://code.djangoproject.com/ticket/29179#comment:3>
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 
For more options, visit https://groups.google.com/d/optout.

Reply via email to