Not a bug SQL Error when searching using certain search keywords

hoks

Member
Affected version
2.2.4
when the search terms include "AND" all caps
Example when I search for "apples AND oranges", I get this error

Code:
XF\Db\InvalidQueryException: MySQL query error [1064]: syntax error, unexpected '+' src/XF/Db/AbstractStatement.php:228


there is no error if I search "apples and oranges"
 
At this time, this isn't something we'd consider to be a bug. This relates to the search index table being converted to InnoDB, which has different has a different full text search implementation than the MyISAM version. The latter is the system XenForo creates out of the box and expects. These queries don't error by default.

(Note that this isn't a SQL injection; this relates to MySQL/InnoDB parsing the value of the search terms themselves, rather than the "main" query.)
 
Top Bottom