From: Sarah Hoffmann Date: Wed, 12 Oct 2016 20:25:04 +0000 (+0200) Subject: check if query is valid unicode string X-Git-Tag: v3.0.0~91^2 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/7b1f35426dada3eb2d210dfc492e16d2f9a42894 check if query is valid unicode string --- diff --git a/lib/Geocode.php b/lib/Geocode.php index ae82498f..ec3ce13b 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -772,6 +772,9 @@ class Geocode } $sQuery = $this->sQuery; + if (!preg_match('//u', $sQuery)) { + userError("Query string is not UTF-8 encoded."); + } // Conflicts between US state abreviations and various words for 'the' in different languages if (isset($this->aLangPrefOrder['name:en'])) {