fix: robust coordinate parsing and allow score for any valid lat/lon

This commit is contained in:
Oliver 2026-02-16 07:43:47 +01:00
parent 9ecc4253ee
commit 198bbd89ab
No known key found for this signature in database
3 changed files with 25 additions and 8 deletions

View file

@ -516,7 +516,8 @@ def handle_score(handler: BaseHTTPRequestHandler, query: dict[str, list[str]]) -
json_response(handler, HTTPStatus.BAD_REQUEST, {"error": "invalid_query"})
return
if not (47.0 <= lat <= 55.5 and 5.0 <= lon <= 16.0):
# Accept any valid geographic coordinate so every point can get a score.
if not (-90.0 <= lat <= 90.0 and -180.0 <= lon <= 180.0):
json_response(handler, HTTPStatus.BAD_REQUEST, {"error": "lat_lon_out_of_bounds"})
return