Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-14456

sphinxsearch, possible missed EscapeString for keywords

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.6
    • Fix Version/s: None
    • Component/s: Search
    • Labels:
      None
    • Environment:
      Debian Wheezy
      PHP 5.4.45, PerconaDB 5.6.27-76.0
      Sphinx 2.0.4-release (r3135)

      Description

      When search keywords contains // simbols, for example ".... http:// ....." get search error:

      index index_phpbb_...._delta,index_phpbb_...._main: syntax error, unexpected '/' near '//'
      

      After adding EscapeString function from /includes/sphinxapi.php to file /phpbb/search/fulltext_sphinx.php search returned normal result, found all ".... http:// ...."

      open /phpbb/search/fulltext_sphinx.php
      find

      		$result = $this->sphinx->Query($search_query_prefix . str_replace('"', '"', $this->search_query), $this->indexes);
      

      before add

      		$this->search_query = $this->sphinx->EscapeString($this->search_query);
      

      But it is not correct way, because operator NOT (simbols -, !) was escaped by this function.
      How to fix it? Or may be it is not bug?..

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Siava Siava
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: