Skip to content

fix(python-cli): escape user-controlled IDs in success messages - #17343

Merged
kodjima33 merged 2 commits into
BasedHardware:mainfrom
britsync07-prog:fix/escape-markup-ids
Sep 23, 2026
Merged

kodjima33 merged 2 commits into
BasedHardware:mainfrom
britsync07-prog:fix/escape-markup-ids

Conversation

@britsync07-prog

@britsync07-prog britsync07-prog commented Sep 23, 2026 •

Copy link
Copy Markdown

Summary

Resource IDs come straight from typer.Argument (argv), but 10 update/delete/complete/progress success messages interpolate them raw into Rich [bold]...[/bold] markup. A markup-like ID crashes the command:

``nomi memory delete 'bad[/bold]id' --yes

MarkupError: closing tag '[/bold]' ... doesn't match any open tag (exit 1)

``n
Same bug class as #15976 (screenshot path), extended to every ID-taking command in memory, `conversation`, `goal` and `action-item`. Fix wraps all 10 argv-sourced IDs with `rich.markup.escape` (the same helper already used for profile names in `auth.py`/`config.py`/`local.py`). Server-returned IDs are untouched.

Verification

  • New tests/test_markup_id_escape.py: 10 tests (delete + update/complete/progress x 4 resources) with markup-like IDs - all 10 fail before the fix, all 10 pass after.
  • Full component suite: 497 passed, 2 skipped.
  • black --check clean on all touched files.

Proposing the standard $25 bug-fix bounty via Algora.

Review in cubic

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confidence 5/5: scoped Rich-markup escaping fix for user-controlled resource IDs (action_item/conversation/goal/memory), dedicated regression tests, clean diff. Merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants