Opened 18 years ago
Closed 18 years ago
#6914 closed defect (wontfix)
How do I forcefully remove a corrupt ticket
| Reported by: | Owned by: | Jonas Borgström | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | general | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description (last modified by )
Someone submitted a malicious ticket to our trac wiki that cannot be opened or evem removed (ticket remove <number>. I assume the submission included some code that is breaking something in python when the ticket is opened because when trac renders the ticket and attempts to display it within the browser I see nothing but python related errors. Here is the traceback I get:
Python Traceback
Traceback (most recent call last):
File "/sage/local/lib/python2.5/site-packages/trac/web/main.py", line 387, in dispatch_request
dispatcher.dispatch(req)
File "/sage/local/lib/python2.5/site-packages/trac/web/main.py", line 237, in dispatch
resp = chosen_handler.process_request(req)
File "/sage/local/lib/python2.5/site-packages/trac/ticket/web_ui.py", line 275, in process_request
ticket = Ticket(self.env, id, db=db)
File "/sage/local/lib/python2.5/site-packages/trac/ticket/model.py", line 40, in __init__
self._fetch_ticket(tkt_id, db)
File "/sage/local/lib/python2.5/site-packages/trac/ticket/model.py", line 83, in _fetch_ticket
% ','.join(std_fields), (tkt_id,))
File "/sage/local/lib/python2.5/site-packages/trac/db/util.py", line 50, in execute
return self.cursor.execute(sql_escape_percent(sql), args)
File "/sage/local/lib/python2.5/site-packages/trac/db/sqlite_backend.py", line 56, in execute
args or [])
File "/sage/local/lib/python2.5/site-packages/trac/db/sqlite_backend.py", line 48, in _rollback_on_error
return function(self, *args, **kwargs)
OperationalError: Could not decode to UTF-8 column 'reporter' with text '"�����<�����math.washington.edu>'
If I use the trac-admin tool to try to remove the ticket, the result is:
Trac [/home/helpmessages/help-trac]> ticket remove 280
Failed to open environment. [Errno 2] No such file or directory: '/home/helpmessages/help-trac/VERSION'
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/trac/scripts/admin.py", line 134, in env_open
self.__env = Environment(self.envname)
File "/usr/lib/python2.4/site-packages/trac/env.py", line 126, in __init__
self.verify()
File "/usr/lib/python2.4/site-packages/trac/env.py", line 174, in verify
fd = open(os.path.join(self.path, 'VERSION'), 'r')
IOError: [Errno 2] No such file or directory: '/home/helpmessages/help-trac/VERSION'
Attachments (0)
Change History (2)
comment:1 by , 18 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 18 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
As Tim said, support issue and trac-admin ticket delete is the way. This should work provided your environment is correct (if it's not, you have a bigger problem than just a corrupt ticket).



First, this sounds like a support issue so please check MailingList or IrcChannel for how to get actual help.
The trac-admin bit should be the right solution, but maybe you have your paths wrong? It also looks like you're using a different Python/Trac install for trac-admin, so make sure that's right. Make sure you're running trac-admin to the right trac env directory (that VERSION file should be there).