Skip to content

Retired Companion routes answer 422 instead of 410 #664

Closed

Description

@Valtora

Eleven of the retired Companion routes in backend/api/v1/api.py answer 422 instead of the 410 that docs/SECURITY.md promises. retired_companion_routes takes **_: str, and FastAPI reads that as a required query parameter named _, so GET /api/v1/login/companion-events gets {"loc": ["query", "_"], "msg": "Field required"} and only ?_=1 gets the 410. FastAPI 0.146.0 and 0.161.1 behave the same, so it predates #648. No credentials are issued either way, and /companion/{legacy_path:path} is fine.

Dropping **_ from the signature fixes it, since the handler reads nothing. A test that calls each retired path and expects 410 would keep it fixed.

Either

Activity

  1. added
    bugSomething isn't working
    severity:lowMinor issue, cosmetic, or low-impact edge case.
    scope:backendBackend API and shared backend code.
    on Oct 23, 2026
  2. self-assigned this
    on Oct 23, 2026
  3. Valtora commented on Oct 23, 2026

    @Valtora
    OwnerAuthor

    Fixed by #665. The handler takes no parameters now, and a test checks every retired route and method answers 410 without setting a cookie.

  4. added a commit that references this issue on Oct 23, 2026
    12aba5e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingscope:backendBackend API and shared backend code.severity:lowMinor issue, cosmetic, or low-impact edge case.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions