mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-06 14:08:07 +00:00
|
Some checks failed
CI / Focused test guidance (report-only) (push) Has been cancelled
CI / Python syntax (compileall) (push) Has been cancelled
CI / JS syntax (node --check) (push) Has been cancelled
CI / Python tests (pytest) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
ci / docker publish / build (amd64) (push) Has been cancelled
ci / docker publish / build (arm64) (push) Has been cancelled
ci / docker publish / merge manifest + tag (push) Has been cancelled
* fix(mcp): reject malformed Args on Add MCP Server instead of silently defaulting to [] * test(mcp): pass every Form param add_server reads past args validation CI's pytest run showed test_add_server_still_accepts_valid_json_args and test_add_server_still_defaults_empty_args_to_empty_list failing with TypeError: the JSON object must be str, bytes or bytearray, not Form. Calling the endpoint function directly bypasses FastAPI's dependency resolution, so an unpassed Form(...) parameter (url, oauth_file, oauth_config) arrives as the Form marker object itself rather than its declared default, and add_server's later `if oauth_file:` check reads that marker as truthy. The malformed-args test never hit this because it raises before reaching that code. Not a production bug: a real HTTP request resolves these through FastAPI before add_server ever runs. * fix(mcp): reject non-list args and surface the new 400 in the Admin panel o3LL's review on #6215 found two gaps in the args validation this PR adds: the Admin panel posts to the same /api/mcp/servers endpoint but never validates Args client-side, so the new 400 falls into the generic failure branch and shows "Added but connection failed: unknown". Mirror the same JSON.parse guard settings.js already has. Also add an isinstance(list) check next to the existing JSON parse, since valid-but-wrong-shaped JSON (args=5) reaches StdioServerParameters(args=5) and 500s in the error formatter. Pre-existing on dev, same validation site this PR already touches. * fix(admin): surface the server's 400 detail instead of a generic connection-failed message The Admin add-server handler read needs_oauth/connected/error but never res.ok, so a request rejected by the isinstance(list) check added for #6211 (args=5, a valid-JSON-but-non-list value the client-side JSON.parse guard cannot catch) fell into the same-shape else branch as a successful add whose connection attempt failed, and the form fields were cleared as if the server had accepted it. |
||
|---|---|---|
| .. | ||
| admin_wipe | ||
| cleanup | ||
| compare | ||
| contacts | ||
| document | ||
| gallery | ||
| history | ||
| mcp | ||
| memory | ||
| note | ||
| research | ||
| search | ||
| task | ||
| vault | ||
| webhook | ||
| __init__.py | ||
| _validators.py | ||
| admin_wipe_routes.py | ||
| api_token_routes.py | ||
| assistant_routes.py | ||
| auth_routes.py | ||
| backup_routes.py | ||
| calendar_routes.py | ||
| chat_helpers.py | ||
| chat_routes.py | ||
| chatgpt_subscription_routes.py | ||
| cleanup_routes.py | ||
| codex_routes.py | ||
| compare_routes.py | ||
| contacts_routes.py | ||
| cookbook_helpers.py | ||
| cookbook_output.py | ||
| cookbook_routes.py | ||
| copilot_routes.py | ||
| device_flow.py | ||
| diagnostics_routes.py | ||
| document_helpers.py | ||
| document_routes.py | ||
| editor_draft_routes.py | ||
| email_helpers.py | ||
| email_pollers.py | ||
| email_routes.py | ||
| embedding_routes.py | ||
| emoji_routes.py | ||
| font_routes.py | ||
| gallery_helpers.py | ||
| gallery_routes.py | ||
| history_routes.py | ||
| hwfit_routes.py | ||
| mcp_routes.py | ||
| memory_routes.py | ||
| model_routes.py | ||
| note_routes.py | ||
| personal_routes.py | ||
| prefs_routes.py | ||
| preset_routes.py | ||
| research_routes.py | ||
| search_routes.py | ||
| session_routes.py | ||
| shell_routes.py | ||
| signature_routes.py | ||
| skills_routes.py | ||
| stt_routes.py | ||
| task_routes.py | ||
| tts_routes.py | ||
| upload_routes.py | ||
| vault_routes.py | ||
| webhook_routes.py | ||
| workspace_routes.py | ||