mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
98_GEOFANCY: fix validation for lat+long
git-svn-id: https://svn.fhem.de/fhem/trunk@10449 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
765a2fa4cc
commit
b768b29205
@ -274,7 +274,7 @@ m/(19|20)\d\d-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):([0-5
|
|||||||
)
|
)
|
||||||
if (
|
if (
|
||||||
defined $webArgs->{latitude}
|
defined $webArgs->{latitude}
|
||||||
&& ( $webArgs->{latitude} !~ m/^[0-9]+([.][0-9]+)?$/
|
&& ( $webArgs->{latitude} !~ m/^-?\d+(\.\d+)?$/
|
||||||
|| $webArgs->{latitude} < -90
|
|| $webArgs->{latitude} < -90
|
||||||
|| $webArgs->{latitude} > 90 )
|
|| $webArgs->{latitude} > 90 )
|
||||||
);
|
);
|
||||||
@ -288,7 +288,7 @@ m/(19|20)\d\d-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):([0-5
|
|||||||
)
|
)
|
||||||
if (
|
if (
|
||||||
defined $webArgs->{longitude}
|
defined $webArgs->{longitude}
|
||||||
&& ( $webArgs->{longitude} !~ m/^[0-9]+([.][0-9]+)?$/
|
&& ( $webArgs->{longitude} !~ m/^-?\d+(\.\d+)?$/
|
||||||
|| $webArgs->{longitude} < -180
|
|| $webArgs->{longitude} < -180
|
||||||
|| $webArgs->{longitude} > 180 )
|
|| $webArgs->{longitude} > 180 )
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user