Edgewall Software
Modify

Opened 5 years ago

Closed 5 years ago

#12277 closed defect (fixed)

ValueError: invalid literal for int() with base 10: "0'A=0"

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.0.10
Component: ticket system Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Non-integer cversion in URL no longer raises an AttributeError. The latest comment revision is instead shown.

API Changes:
  • as_bool and as_int from trac.util are available to templates.
  • Added id edit-comment-{cnum} to Edit comment button on ticket page.
Internal Changes:

Description

Found the following in the logs.

2015-12-12 23:00:23,531 Trac[main] ERROR: Internal Server Error: <RequestWithSession "GET "/ticket/12191?cversion=0'A=0&cnum_hist=8"">, referrer "https://trac-hacks.org/ticket/12191?cversion=0'A=0&cnum_hist=8"
Traceback (most recent call last):
  File "build/bdist.linux-i686/egg/trac/web/main.py", line 554, in _dispatch_request
    dispatcher.dispatch(req)
  File "build/bdist.linux-i686/egg/trac/web/main.py", line 267, in dispatch
    iterable=chrome.use_chunked_encoding)
  File "build/bdist.linux-i686/egg/trac/web/chrome.py", line 1111, in render_template
    encoding='utf-8')
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/core.py", line 183, in render
    return encode(generator, method=method, encoding=encoding, out=out)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/output.py", line 58, in encode
    for chunk in iterator:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/output.py", line 339, in __call__
    for kind, data, pos in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/output.py", line 826, in __call__
    for kind, data, pos in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/output.py", line 670, in __call__
    for kind, data, pos in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/output.py", line 771, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/output.py", line 586, in __call__
    for ev in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "build/bdist.linux-i686/egg/trac/web/chrome.py", line 1309, in _strip_accesskeys
    for kind, data, pos in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "build/bdist.linux-i686/egg/trac/web/chrome.py", line 1298, in _generate
    for kind, data, pos in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/filters/transform.py", line 686, in _unmark
    for mark, event in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/filters/transform.py", line 1145, in __call__
    for mark, event in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/filters/transform.py", line 714, in __call__
    for mark, event in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/filters/transform.py", line 682, in _mark
    for event in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/filters/transform.py", line 686, in _unmark
    for mark, event in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/filters/transform.py", line 1081, in __call__
    for mark, event in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/filters/transform.py", line 117, in __iter__
    event = self.stream.next()
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/filters/transform.py", line 714, in __call__
    for mark, event in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/filters/transform.py", line 682, in _mark
    for event in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/template/base.py", line 605, in _include
    for event in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/template/markup.py", line 378, in _match
    ctxt, start=idx + 1, **vars):
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/template/markup.py", line 378, in _match
    ctxt, start=idx + 1, **vars):
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/template/markup.py", line 327, in _match
    for event in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/template/base.py", line 545, in _flatten
    for kind, data, pos in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/path.py", line 588, in _generate
    subevent = next()
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/template/base.py", line 605, in _include
    for event in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/template/markup.py", line 316, in _strip
    event = next()
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/template/base.py", line 545, in _flatten
    for kind, data, pos in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/path.py", line 588, in _generate
    subevent = next()
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/template/base.py", line 605, in _include
    for event in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/template/markup.py", line 316, in _strip
    event = next()
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/template/base.py", line 545, in _flatten
    for kind, data, pos in stream:
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/template/directives.py", line 717, in __call__
    value = _eval_expr(expr, ctxt, vars)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/template/base.py", line 277, in _eval_expr
    retval = expr.evaluate(ctxt)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Genshi-0.6-py2.6-linux-i686.egg/genshi/template/eval.py", line 178, in evaluate
    return eval(self.code, _globals, {'__data__': data})
  File "/srv/trac-hacks.org/trac/.egg-cache/Trac-1.0.9-py2.6.egg-tmp/trac/ticket/templates/ticket_change.html", line 23, in <Expression '?'>
    <html xmlns="http://www.w3.org/1999/xhtml"ValueError: invalid literal for int() with base 10: "0'A=0"

Attachments (0)

Change History (1)

comment:1 by Ryan J Ollos, 5 years ago

API Changes: modified (diff)
Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Committed to 1.0-stable in [14451], merged to trunk in [14452].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.