]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-php/website/search.php
blacklist broken request from faulty app
[nominatim.git] / lib-php / website / search.php
index 619dec6d9b67aaf8f911737595f5686526741fa4..4dcbc5b7b84b062354da6e8fca59745103a3c059 100644 (file)
@@ -54,7 +54,12 @@ if (!$oGeocode->getQueryString()
 
 $hLog = logStart($oDB, 'search', $oGeocode->getQueryString(), $aLangPrefOrder);
 
-$aSearchResults = $oGeocode->lookup();
+// Ignore requests from a faulty app.
+if ($oGeocode->getQueryString() === '-1,-1') {
+  $aSearchResults = array();
+} else {
+  $aSearchResults = $oGeocode->lookup();
+}
 
 logEnd($oDB, $hLog, count($aSearchResults));