odysseus/static
Léo 01b8ac5fea fix(mcp): reject malformed Args on Add MCP Server instead of defaulting to []
`add_server` wrapped `json.loads(args)` in a bare `except` that fell back to
`[]`, so an Args value that is not JSON — a bare path, which is what the form's
placeholder invites people to type — registered the server and spawned the
stdio subprocess with an empty argv. Nothing surfaced the loss: the POST
returned 200 and the row persisted with `"args": []`.

The route now returns 400 for an unparseable value, and also for valid JSON of
the wrong shape: `args=5` reached `StdioServerParameters(args=5)` and raised an
unhandled TypeError in the error formatter's `" ".join(...)`.

Both form clients mirror the guard instead of leaving the user to read a 400
they cannot see. `settings.js` stops silently defaulting a bad Args value, and
`admin.js` gains the same client-side parse check plus a `res.ok` branch so a
server-side rejection is not reported as a connection failure.

Ported from public `dev` (`9d5c0319`, #6215 upstream, fixing #6211), with its
test. The `admin.js` hunks are inert on `lab` — `initMcpForm` early-returns
because that form's markup is not in this build — and are carried anyway to
keep the two lines from diverging further.
2026-09-30 12:54:09 +02:00
..
css refactor(css): move cookbook, research, memory and settings styles to their own file 2026-09-23 16:12:53 +02:00
fonts feat(a11y): add a Text size control and an OpenDyslexic font option (#4210) 2026-06-22 13:53:46 +02:00
icons Cookbook model workflow fixes 2026-06-21 11:02:35 +00:00
js fix(mcp): reject malformed Args on Add MCP Server instead of defaulting to [] 2026-09-30 12:54:09 +02:00
lib perf(static): vendor KaTeX and Mermaid, and load them on first use (#5994) 2026-08-16 22:43:12 +01:00
test-fixtures Squash Odysseus development history 2026-09-11 06:04:19 +00:00
app.js fix(ui): bust cache for collapsible subscription usage 2026-09-22 13:12:19 +01:00
icon.ico feat(launcher): add portable windows launcher (#976) 2026-06-16 04:58:16 +01:00
index.html refactor(css): move cookbook, research, memory and settings styles to their own file 2026-09-23 16:12:53 +02:00
login.html Squash Odysseus development history 2026-09-11 06:04:19 +00:00
manifest.json pwa missing icons added (#428) 2026-06-15 16:00:13 +09:00
modal-control-variants.html Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
research-ascii-variants.html Squash Odysseus development history 2026-09-11 06:04:19 +00:00
research-ascii-variants.js Squash Odysseus development history 2026-09-11 06:04:19 +00:00
style.css refactor(css): move cookbook, research, memory and settings styles to their own file 2026-09-23 16:12:53 +02:00
sw.js refactor(css): move cookbook, research, memory and settings styles to their own file 2026-09-23 16:12:53 +02:00
wave-variants.html Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
whirlpool-variants.html Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00