#5811 closed defect (duplicate)
Hash char (#) wiki reference with an out of bound integer causes internal error
| Reported by: | 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 )
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 , 18 years ago
comment:2 by , 18 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
follow-up: 4 comment:3 by , 18 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
follow-up: 5 comment:4 by , 18 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.
comment:5 by , 18 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 , 18 years ago
| Description: | modified (diff) |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
Yeah, that's a duplicate of #4794.



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.