From: Sarah Hoffmann Date: Mon, 19 Jul 2021 07:43:04 +0000 (+0200) Subject: Merge remote-tracking branch 'upstream/master' X-Git-Tag: deploy~159 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/73953cbac95847740339d7a5ee3c0e5f142d93c5?ds=inline;hp=-c Merge remote-tracking branch 'upstream/master' --- 73953cbac95847740339d7a5ee3c0e5f142d93c5 diff --combined lib-php/website/search.php index 56064e7a,b3a0fe83..e553ef39 --- a/lib-php/website/search.php +++ b/lib-php/website/search.php @@@ -54,12 -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)); @@@ -82,7 -77,9 +82,9 @@@ if (isset($_SERVER['REQUEST_SCHEME'] $sMoreURL = '/search.php?'.http_build_query($aMoreParams); } - if (CONST_Debug) exit; + if (CONST_Debug) { + exit; + } $sOutputTemplate = ($sOutputFormat == 'jsonv2') ? 'json' : $sOutputFormat; include(CONST_LibDir.'/template/search-'.$sOutputTemplate.'.php');