From ea761a15b6b4bc430ef51c192c8ee4c7a7133a54 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Tue, 25 Jun 2013 08:24:22 +0200 Subject: [PATCH 1/1] 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 18fcbafc..272324b1 100755 --- a/website/search.php +++ b/website/search.php @@ -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]; -- 2.39.5