mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 10:24:02 +00:00
fix: reject out-of-range coordinates in Google text search
Adapt the coordinate bounds check contributed in public PR #46 to the Places provider.
This commit is contained in:
1 parent
8bcf1460fc
commit
3b19af4076
1 file changed
+2
-1
@@ -183,7 +183,8 @@ export function googlePlacesContextProxy({
|
||||
if (
|
||||
!textQuery ||
|
||||
!Number.isFinite(latitude) ||
|
||||
!Number.isFinite(longitude)
|
||||
!Number.isFinite(longitude) ||
|
||||
latitude < -90 || latitude > 90 || longitude < -180 || longitude > 180
|
||||
) {
|
||||
res.statusCode = 400;
|
||||
res.setHeader('Content-Type', 'application/json');
|
||||
|
||||
Reference in new issue
Block a user