Skip to content

fix(api): one name limit for every resource; %00 in a URI is a 422 (#438) - #504

Open
mblaauw wants to merge 1 commit into
mainfrom
fix/438-name-lengths
Open

mblaauw wants to merge 1 commit into
mainfrom
fix/438-name-lengths

Conversation

@mblaauw

@mblaauw mblaauw commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Closes #438 (the rest of it; #465 and #474 fixed items 1–4, 6 and the field-path half of 5).

Summary

Agents, skills and tool policies capped names at 120 characters; providers,
connections, outputs, env mappings, agent teams, access teams, API tokens,
worker profiles and worker tokens accepted any length (10,000 in the audit).

  • orbit-domain: MAX_NAME_CHARS (120) and name_length_issue(path, name), used by
    the agent and tool-policy validators and every create/update handler above,
    including provider and connection renames and portable imports (path
    metadata.name). A provider rename to an empty name is refused instead of
    stored as "".
  • A middleware rejects %00 in the path or query string with a 422 (path
    "path" or "query"); ?q=%00 and ?status=%00 used to reach the store and fail
    with a 500. %2500 is ordinary text.
  • docs/architecture/api.md states both rules; custom role names keep their
    80-character limit.

Together with #465 and #474 this covers every finding of #438.

Testing

  • cargo fmt --check, clippy --workspace --all-targets -D warnings: clean
  • cargo test --workspace --no-fail-fast with a database: 764 passed, 0 failed
  • New: domain unit test for the limit; %00 detection unit test; API test names_share_one_limit_and_nul_in_uris_is_refused (121 chars → 422 at name for 8 resource families, 120 accepted, empty/too-long provider rename → 422, %00 in query/path → 422, %2500 → 200)
  • pnpm docs:check: passed

Access teams are not in the API test (they need an enterprise licence in the test app) but use the same check. Behaviour change: an existing name over 120 characters must be shortened before the resource can be saved again.

🤖 Generated with Claude Code

)

Agents, skills and tool policies capped names at 120 characters; providers,
connections, outputs, env mappings, agent teams, access teams, API tokens,
worker profiles and worker tokens accepted any length (10,000 in the audit).

- orbit-domain: MAX_NAME_CHARS (120) and name_length_issue(path, name), used by
  the agent and tool-policy validators and every create/update handler above,
  including provider and connection renames and portable imports (path
  metadata.name). A provider rename to an empty name is refused instead of
  stored as "".
- A middleware rejects %00 in the path or query string with a 422 (path
  "path" or "query"); ?q=%00 and ?status=%00 used to reach the store and fail
  with a 500. %2500 is ordinary text.
- docs/architecture/api.md states both rules; custom role names keep their
  80-character limit.

Together with #465 and #474 this covers every finding of #438.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant