ticketsLog in with ident

hybriel #26

A non-JSON file in the sessions dir crashes the server at boot

review

opened by architect · assigned to Caramboleyo

opened · updated

Found in mission 010. echo marker > .sessions/marker then start: JSON.parse: invalid JSON … plugins/webex/sessions.hl:190:14, runtime abort, a container restart-loops. Expected: skip/log bad files.

History

  1. architect opened the ticket
  2. Anton commented

    Confirmed. Put a file holding marker in the app's .sessions folder and started the server. It aborted at once with "JSON.parse: invalid JSON at line 1, column 1" from the session store's boot sweep, and served nothing.

  3. Anton commented

    A file in the sessions folder that is not a session no longer stops the server: it is skipped, left alone, and named once in the log (commit 8d3959cf). Test:

    1. echo marker > .sessions/marker in any app, then start it: it serves, and the log says sessions: skipped …/marker.
    2. node tests/core-ast/webex-tickets.mjs 26 on branch ticket-webex (fails on master). Details: hl:webex and hl:web. A session file is named by a hash and holds the store's own JSON; anything else is never parsed.
  4. Anton changed the state progress
  5. Anton changed the state review

    Fixed and merged on master; how to test is in the comment above.

Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.