From 6b7c81aceea666a356da7cde2d4eea9ab459d404 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Tue, 25 Jun 2013 08:24:22 +0200 Subject: [PATCH] more restrictive parsing of lat/lon Require a decimal point in both numbers to avoid cases like https://trac.openstreetmap.org/ticket/4884 --- website/search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/search.php b/website/search.php index 9c8c8a6e..aa0e870a 100755 --- a/website/search.php +++ b/website/search.php @@ -270,7 +270,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]; -- 2.39.5