• Resolved simongarrett

    (@simongarrett)


    More of a query than an issue. I created a JSON marker file but my code initially missed the surrounding [ and ] brackets. When the marker file was accessed by the osmap shortcode, I got a message that the wp site had crashed. “There has been a critical error on this website.” This was repeatable. I appreciate that I was feeding it invalid json.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author skirridsystems

    (@skirridsystems)

    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.

    Plugin Author skirridsystems

    (@skirridsystems)

    Can you send the markerfile that caused the crash? I tried removing the square brackets and the error was caught.

    Thread Starter simongarrett

    (@simongarrett)

    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.
    Plugin Author skirridsystems

    (@skirridsystems)

    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.

    Plugin Author skirridsystems

    (@skirridsystems)

    Fixed in 1.8.4

    Thread Starter simongarrett

    (@simongarrett)

    Thanks!

    Simon

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.