Page MenuHomePhabricator

Database Error when searching for term which includes parenthesis characters
Closed, ResolvedPublic

Description

Author: asokratis

Description:
searching on the wiki with characters such as ")" or "(" (maybe there are more?) will show a page with the following:
Database Error.
A database query error has occurred. This may indicate a bug in the software.

Examples of Search:
test)
test(

If a ticket for this has already been open, please close this ticket and refer to me where the issue so I can be monitoring it.


Version: 1.23.1
Severity: normal

Details

Reference
bz67920

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:25 AM
bzimport set Reference to bz67920.
bzimport added a subscriber: Unknown Object (MLST).

searching on the wiki

Which of those few hundreds? Please provide exact steps to reproduce. :)

asokratis wrote:

Updated that the version of wiki 1.23.1

asokratis wrote:

Haha :)

I am not good at searching, but I stumbled on this:

https://bugzilla.wikimedia.org/show_bug.cgi?id=23108

and I am going to quote this

"Some quick testing indicates this is very likely to be caused by a literal '(' in the $terms parameter, which is thrown into a regex unescaped."

Notice that he says literal '('? That is what we share in common.

Replication steps:
1)On a configured MediaWiki, on the upper right corner, there is a search textbox
2)Type something that includes the literal ')' (Example: "test)") or the literal '(' (Example: "test(")
3)The following error shows when searching such values from point 2:
"Database Error.
A database query error has occurred. This may indicate a bug in the software."

asokratis wrote:

I also am not competent on how mediawiki works. I am more of a normal user than a heavy user knowing the internals behind. I hope my bug post helps and if not, hopefully it is referred to the correct # issue.

(In reply to Andre Klapper from comment #1)

Which of those few hundreds? Please provide exact steps to reproduce. :)

Oh sorry, I didn't realize that you refer to your own hosted instance.

Search is about to get replaced by LuceneSearch so this is probably low priority currently...

TheDJ claimed this task.
TheDJ subscribed.

mysql search does not throw errors when using () in search terms any longer