Modify ↓
#7311 closed defect (fixed)
Plugins failed to work when a ticket type name contains a single quote
Reported by: | orio | Owned by: | Richard Liao |
---|---|---|---|
Priority: | normal | Component: | TracTicketTemplatePlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description
Hi,
When updating our Trac instance from 0.11 to 0.12, the plugin failed to work because of a ticket type containing a single quote.
The ticket type name was: Demande d'ouverture
Here the trace generated when trying to create a new ticket:
2010-06-29 14:37:58,716 Trac[main] ERROR: Internal Server Error: Traceback (most recent call last): File "build/bdist.linux-i686/egg/trac/web/main.py", line 513, in _dispatch_request dispatcher.dispatch(req) File "build/bdist.linux-i686/egg/trac/web/main.py", line 235, in dispatch resp = chosen_handler.process_request(req) File "build/bdist.linux-i686/egg/tickettemplate/ttadmin.py", line 248, in process_request result = TT_Template.fetchAll(self.env, data) File "build/bdist.linux-i686/egg/tickettemplate/model.py", line 153, in fetchAll cursor.execute(sqlString % data) File "build/bdist.linux-i686/egg/trac/db/util.py", line 66, in execute return self.cursor.execute(sql) File "build/bdist.linux-i686/egg/trac/db/sqlite_backend.py", line 78, in execute result = PyFormatCursor.execute(self, *args) File "build/bdist.linux-i686/egg/trac/db/sqlite_backend.py", line 56, in execute args or []) File "build/bdist.linux-i686/egg/trac/db/sqlite_backend.py", line 48, in _rollback_on_error return function(self, *args, **kwargs) OperationalError: near "ouverture": syntax error
We dirtyfix the plugin using double quote instead of single quote inside the sqlString
to enclose variables in model.py
Attachments (0)
Note: See
TracTickets for help on using
tickets.
(In [8172]) Fixed #7311