diff options
author | Andreas Jakum <aj-gh@users.noreply.github.com> | 2020-12-26 23:09:45 +0100 |
---|---|---|
committer | Andreas Jakum <aj-gh@users.noreply.github.com> | 2020-12-26 23:09:45 +0100 |
commit | 5b2affde75e9337990e182667d45fc59ac4c2c23 (patch) | |
tree | 65464194f888a1d12896f7459db5a4ad81656262 /index.php | |
parent | b8f4795951c0c9b8f513bf3d0734da94a1d1d902 (diff) | |
parent | fd9ee80f9babc4bc795e99e08f88140888b44455 (diff) |
Merge branch 'master' into stablestable
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,9 +1,9 @@ <?php session_start(); -if(isset($_REQUEST['lat'])) $lat = mysql_escape_string($_REQUEST['lat']); -if(isset($_REQUEST['lng'])) $lng = mysql_escape_string($_REQUEST['lng']); -if(isset($_REQUEST['res'])) $res = $_REQUEST['res']; +if(isset($_REQUEST['lat']) && preg_match('/^\-?[0-9\.]+$/', $_REQUEST['lat'])) $lat = $_REQUEST['lat']; +if(isset($_REQUEST['lng']) && preg_match('/^\-?[0-9\.]+$/', $_REQUEST['lng'])) $lng = $_REQUEST['lng']; +if(isset($_REQUEST['res']) && preg_match('/^[0-9]+$/', $_REQUEST['res'])) $res = $_REQUEST['res']; //default values if(empty($lat)) $lat=47.07102; |