-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Description
It's possible to create a valid Layergroup id with an invalid MapConfig.
Give a MapConfig like:
{"layers":[{"options":{"sql":"SELECT null::geometry the_geom_webmercator"}}]}The map backend will try store the configuration in Redis. If the configuration was not already in Redis, it will validate the MapConfig creating some renderers. However, if another request arrives before the validation has ended, it will found the Layergroup id in Redis and it will return it without any kind of validation.
I was able to reproduce the issue using GNU Parallel using:
parallel curl ::: -s -s ::: http://development.localhost.lan:8181/api/v1/map?config=%7B%22layers%22%3A%5B%7B%22options%22%3A%7B%22sql%22%3A%22SELECT+null%3A%3Ageometry+the_geom_webmercator%22%7D%7D%5D%7D http://development.localhost.lan:8181/api/v1/map?config=%7B%22layers%22%3A%5B%7B%22options%22%3A%7B%22sql%22%3A%22SELECT+null%3A%3Ageometry+the_geom_webmercator%22%7D%7D%5D%7DReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels