From f8d55b5448b6be721a6ea05567930fe244ead7d1 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Fri, 6 Oct 2017 00:22:27 +0200 Subject: [PATCH] sanitize special search term before normalizing --- lib/Geocode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Geocode.php b/lib/Geocode.php index bd0f5b62..d96aaac2 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -1061,7 +1061,7 @@ class Geocode continue; } - $sToken = chksql($this->oDB->getOne("SELECT make_standard_name('".$aSpecialTerm[1]."') AS string")); + $sToken = chksql($this->oDB->getOne("SELECT make_standard_name('".pg_escape_string($aSpecialTerm[1])."') AS string")); $sSQL = 'SELECT * '; $sSQL .= 'FROM ( '; $sSQL .= ' SELECT word_id, word_token, word, class, type, country_code, operator'; -- 2.39.5