mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
more strict parameter checking for reverse
This commit is contained in:
@@ -45,10 +45,8 @@
|
||||
$oPlaceLookup->setOSMID($_GET['osm_type'], $_GET['osm_id']);
|
||||
|
||||
$aPlace = $oPlaceLookup->lookup();
|
||||
|
||||
//if (!$iPlaceID) $sError = 'OSM ID Not Found';
|
||||
}
|
||||
else
|
||||
else if (isset($_GET['lat']) && isset($_GET['lon']) && preg_match('/^[+-]?[0-9]*\.?[0-9]+$/', $_GET['lat']) && preg_match('/^[+-]?[0-9]*\.?[0-9]+$/', $_GET['lon']))
|
||||
{
|
||||
$oReverseGeocode = new ReverseGeocode($oDB);
|
||||
$oReverseGeocode->setLanguagePreference($aLangPrefOrder);
|
||||
@@ -59,6 +57,10 @@
|
||||
|
||||
$aPlace = $oReverseGeocode->lookup();
|
||||
}
|
||||
else
|
||||
{
|
||||
$aPlace = null;
|
||||
}
|
||||
|
||||
if (CONST_Debug) exit;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user