Thanks for the report. Invalid data definitely should not crash the website! There is some sanitisation but evidently not enough. I will look into this.
I had been thinking about moving the marker file interpreter into the client side Javascript, which would also reduce server load, but I’ve not had time to do it yet.
Can you send the markerfile that caused the crash? I tried removing the square brackets and the error was caught.
This caused an error:
{ “location”: “52.62533, 1.29572”, “desc”: “2026-02-01 13:40:43”}
This didn’t:
[
{ “location”: “52.62533, 1.29572”, “desc”: “2026-02-01 13:40:43”}
]
The shortcode I used:
[osmap zoom=6 extent=”52.39251, 1.00509|51.96394, 1.35339″ width=800 markerfile=”https://simongarrett.uk/files/location.json” ]
My apologies if it’s something I’ve done wrong!
Oh, did I use a smart double quote after the marker file name?
PS – just retyped it, now definitely not smart double quote, still fails with a single line of json without [ and ]
-
This reply was modified 5 months, 2 weeks ago by
simongarrett.
-
This reply was modified 5 months, 2 weeks ago by
simongarrett.
Thanks for the update, it was the single item in the array that was causing the test to miss. I’ll get the fixed version released soon.
And no, nothing you’ve done wrong. Wrong user data is expected to cause an incorrect display but it should never be able to cause a site crash.