Looking at the log file for askbot, I noticed that an exception is raised when someone puts an apostrophe in the title.
Looks like this is due to the pre-search query executed on psql. Probably because the apostrophe isn't escaped.
Note that the user of the system doesn't get an exception, so that's transparent to them. I think the only issue might be that the pre-search really isn't running at that point.
Here is a trace:
/usr/local/lib/python2.6/site-packages/askbot-0.6.82-py2.6.egg/askbot/middleware/pagesize.py TIME: 2011-05-17 09:14:28,255
MSG: pagesize.py:process_exception:44 <class 'psycopg2.programmingerror'="">
/usr/local/lib/python2.6/site-packages/askbot-0.6.82-py2.6.egg/askbot/middleware/pagesize.py TIME: 2011-05-17 09:14:28,256
MSG: pagesize.py:process_exception:45 syntax error in tsquery: "'No&BSP's&for&th'"
/usr/local/lib/python2.6/site-packages/askbot-0.6.82-py2.6.egg/askbot/middleware/pagesize.py TIME: 2011-05-17 09:14:29,252
MSG: pagesize.py:process_exception:43 File "/usr/local/lib/python2.6/site-packages/django/core/handlers/base.py", line 99, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.6/site-packages/askbot-0.6.82-py2.6.egg/askbot/utils/decorators.py", line 56, in wrapper
return view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.6/site-packages/askbot-0.6.82-py2.6.egg/askbot/views/commands.py", line 444, in api_get_questions
for question in questions:
File "/usr/local/lib/python2.6/site-packages/django/db/models/query.py", line 107, in _result_iter
self._fill_cache()
File "/usr/local/lib/python2.6/site-packages/django/db/models/query.py", line 696, in _fill_cache
self._result_cache.append(self._iter.next())
File "/usr/local/lib/python2.6/site-packages/django/db/models/query.py", line 239, in iterator
for row in self.query.results_iter():
File "/usr/local/lib/python2.6/site-packages/django/db/models/sql/query.py", line 284, in results_iter
for rows in self.execute_sql(MULTI):
File "/usr/local/lib/python2.6/site-packages/django/db/models/sql/query.py", line 2347, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python2.6/site-packages/django/db/backends/util.py", line 19, in execute
return self.cursor.execute(sql, params)
/usr/local/lib/python2.6/site-packages/askbot-0.6.82-py2.6.egg/askbot/middleware/pagesize.py TIME: 2011-05-17 09:14:29,253
MSG: pagesize.py:process_exception:44 <class 'psycopg2.programmingerror'="">
/usr/local/lib/python2.6/site-packages/askbot-0.6.82-py2.6.egg/askbot/middleware/pagesize.py TIME: 2011-05-17 09:14:29,253
MSG: pagesize.py:process_exception:45 syntax error in tsquery: "'No&BSP's&for&this'"
Fixed in 0.6.87. Thanks for the catch!
Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.
create your Q&A siteAsked: 2011-05-17 09:24:27 -0500
Seen: 164 times
Last updated: May 17 '11
Internal Server Error when trying to edit personal pro
Where are the badges in a fresh install? [fixed]
HTML Tags in titles getting eaten <fixed/>
Unknown column 'auth_user.is_approved' in 'field list' [fixed]
email for comments: link missing a href [fixed]
Bug: Horizontal Rule in Comment breaks stylesheet [fixed]
"Related questions" section shows deleted questions?
error on upvote: "Sorry, something is not right here..." [fixed]
Copyright Askbot, 2010-2011. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.