ProgrammingError: spiexceptions.SyntaxError: syntax error in tsquery
Bug #1020443 reported by
Diogo Matsubara
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
Abel Deuring |
Bug Description
OOPS-74344500aca70d5e087bc6abcbbe1ce7 shows a ProgrammingError: spiexceptions.
Steps to reproduce:
1. https:/
2. In Summary fill in: ?!.
3. Click Continue
4. OOPS-74344500aca70d5e087bc6abcbbe1ce7
Related branches
lp:~adeuring/launchpad/bug-1020443
Merged
into
lp:launchpad
- j.c.sackett (community): Approve
-
Diff: 328 lines (+191/-30)2 files modifieddatabase/schema/patch-2209-24-3.sql (+124/-0)
lib/lp/services/database/doc/textsearching.txt (+67/-30)
lp:~adeuring/launchpad/bug-1020443-2
- j.c.sackett (community): Approve
- Stuart Bishop: Pending requested
-
Diff: 1030 lines (+446/-81)19 files modifieddatabase/schema/patch-2209-24-3.sql (+124/-0)
lib/lp/answers/doc/faq-vocabulary.txt (+1/-3)
lib/lp/answers/doc/faq.txt (+1/-1)
lib/lp/answers/model/faq.py (+1/-1)
lib/lp/answers/model/question.py (+18/-6)
lib/lp/answers/stories/this-is-a-faq.txt (+2/-2)
lib/lp/bugs/doc/bugtask-find-similar.txt (+1/-0)
lib/lp/bugs/doc/bugtask-search.txt (+58/-2)
lib/lp/bugs/model/bugtasksearch.py (+5/-2)
lib/lp/bugs/model/tests/test_bugtasksearch.py (+4/-2)
lib/lp/registry/browser/product.py (+1/-1)
lib/lp/registry/doc/vocabularies.txt (+11/-1)
lib/lp/registry/model/person.py (+8/-7)
lib/lp/registry/tests/test_person_vocabularies.py (+25/-1)
lib/lp/registry/tests/test_personset.py (+53/-2)
lib/lp/registry/tests/test_product_vocabularies.py (+10/-0)
lib/lp/registry/tests/test_projectgroup_vocabulary.py (+26/-0)
lib/lp/registry/vocabularies.py (+24/-20)
lib/lp/services/database/doc/textsearching.txt (+73/-30)
lp:~adeuring/launchpad/bug-1020443-model
- Abel Deuring (community): Approve (code)
-
Diff: 690 lines (+249/-51)17 files modifiedlib/lp/answers/doc/faq-vocabulary.txt (+1/-3)
lib/lp/answers/doc/faq.txt (+1/-1)
lib/lp/answers/model/faq.py (+1/-1)
lib/lp/answers/model/question.py (+18/-6)
lib/lp/answers/stories/this-is-a-faq.txt (+2/-2)
lib/lp/bugs/doc/bugtask-find-similar.txt (+1/-0)
lib/lp/bugs/doc/bugtask-search.txt (+58/-2)
lib/lp/bugs/model/bugtasksearch.py (+5/-2)
lib/lp/bugs/model/tests/test_bugtasksearch.py (+4/-2)
lib/lp/registry/browser/product.py (+1/-1)
lib/lp/registry/doc/vocabularies.txt (+11/-1)
lib/lp/registry/model/person.py (+8/-7)
lib/lp/registry/tests/test_person_vocabularies.py (+25/-1)
lib/lp/registry/tests/test_personset.py (+53/-2)
lib/lp/registry/tests/test_product_vocabularies.py (+10/-0)
lib/lp/registry/tests/test_projectgroup_vocabulary.py (+26/-0)
lib/lp/registry/vocabularies.py (+24/-20)
lp:~adeuring/launchpad/bug-1020443-db-patch
- Stuart Bishop (community): Approve
-
Diff: 338 lines (+197/-30)2 files modifieddatabase/schema/patch-2209-24-3.sql (+124/-0)
lib/lp/services/database/doc/textsearching.txt (+73/-30)
description: | updated |
tags: | added: questions |
Changed in launchpad: | |
assignee: | nobody → Abel Deuring (adeuring) |
status: | Triaged → In Progress |
Changed in launchpad: | |
status: | Fix Committed → In Progress |
tags: |
added: bad-commit-15696 qa-bad removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → In Progress |
tags: |
added: qa-ok removed: qa-needstesting |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Its not an attack vector.
The ftq() stored procedure is responsible for turning arbitrary input and our AND, OR, NOT boolean operations into a valid tsearch2 query string. It is failing in this case by leaving in the spurious punctuation; the '!' is a tsearch2 NOT operator and not proceded by an & or | to separate it, so we get a syntax error.