mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-14 18:37:58 +00:00
more restrictive parsing of lat/lon
Require a decimal point in both numbers to avoid cases like https://trac.openstreetmap.org/ticket/4884
This commit is contained in:
@@ -266,7 +266,7 @@
|
||||
$sQuery = trim(str_replace($aData[0], ' ', $sQuery));
|
||||
}
|
||||
}
|
||||
elseif (preg_match('/(\\[|^|\\b)(-?[0-9]+[0-9.]*)[, ]+(-?[0-9]+[0-9.]*)(\\]|$|\\b)/', $sQuery, $aData))
|
||||
elseif (preg_match('/(\\[|^|\\b)(-?[0-9]+[0-9]*\\.[0-9]+)[, ]+(-?[0-9]+[0-9]*\\.[0-9]+)(\\]|$|\\b)/', $sQuery, $aData))
|
||||
{
|
||||
$fQueryLat = $aData[2];
|
||||
$fQueryLon = $aData[3];
|
||||
|
||||
Reference in New Issue
Block a user