Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

Last modified 12 years ago

#5811 closed defect (duplicate)

Hash char (#) wiki reference with an out of bound integer causes internal error

Reported by: martin@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version: 0.10.2
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

If a hash char followed by an out of bound integer is entered in a bug description, possibly other wiki based texts will cause an internal error

Counter example: Add the following to a bug description (hash char)11866032749054

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 387, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 238, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.4/site-packages/trac/ticket/report.py", line 88, in process_request
    resp = self._render_view(req, db, id)
  File "/usr/lib/python2.4/site-packages/trac/ticket/report.py", line 332, in _render_view
    absurls=(format == 'rss'))
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 999, in wiki_to_html
    Formatter(env, req, absurls, db).format(wikitext, out, escape_newlines)
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 822, in format
    result = re.sub(self.wiki.rules, self.replace, line)
  File "/usr/lib/python2.4/sre.py", line 142, in sub
    return _compile(pattern, 0).sub(repl, string, count)
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 768, in replace
    replacement = self.handle_match(fullmatch)
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 761, in handle_match
    return external_handler(self, match, fullmatch)
  File "/usr/lib/python2.4/site-packages/trac/ticket/api.py", line 204, in <lambda>
    lambda x, y, z: self._format_link(x, 'ticket', y[1:], y, z))
  File "/usr/lib/python2.4/site-packages/trac/ticket/api.py", line 214, in _format_link
    (str(int(target)),))
  File "/usr/lib/python2.4/site-packages/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.4/site-packages/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.4/site-packages/pyPgSQL/PgSQL.py", line 3111, in execute
    raise OperationalError, msg
OperationalError: ERROR:  value "11866032749054" is out of range for type integer

Attachments (0)

Change History (7)

comment:1 by Eli Carter, 17 years ago

We had a bug or two similar to this in the past; are you able to duplicate this with trunk or the stable branch?

This may be pyPgSQL specific.

comment:2 by r.sokoll@…, 17 years ago

Cannot reproduce this with

Trac:  	0.11dev-r5883
Python: 	2.5 (r25:51908, May 25 2007, 16:14:04) [GCC 4.1.2 20061115 (prerelease) (SUSE Linux)]
setuptools: 	0.6c6
SQLite: 	3.3.8
pysqlite: 	2.3.4
Genshi: 	0.4.2
Pygments: 	0.8.1
Subversion: 	1.4.4 (r25188)
jQuery:	1.1.3.1

comment:3 by Tim Hatch, 17 years ago

This must be some version of 0.10 stable, as it's fixed in trunk. See http://trac.edgewall.org/browser/trunk/trac/ticket/api.py?rev=5505#L343

in reply to:  3 ; comment:4 by anonymous, 17 years ago

Replying to thatch:

This must be some version of 0.10 stable, as it's fixed in trunk. See http://trac.edgewall.org/browser/trunk/trac/ticket/api.py?rev=5505#L343

I believe it is also fixed on the stable branch — t.e.o is not affected by this. But I'd like verification of it.

in reply to:  4 comment:5 by Eli Carter, 17 years ago

Replying to anonymous:

I believe it is also fixed on the stable branch — t.e.o is not affected by this. But I'd like verification of it.

And that would be me forgetting to log in.

comment:6 by Christian Boos, 17 years ago

Description: modified (diff)
Resolution: fixed
Status: newclosed

Yeah, that's a duplicate of #4794.

comment:7 by Christian Boos, 12 years ago

Resolution: fixedduplicate

(fixing {36})

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström 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.