Several Python CLI status/error messages interpolate user-controlled profile names or config values directly into Rich markup strings. A profile name such as bad[/bold] can make otherwise successful commands fail while rendering their message, after the config or auth state has already been changed.
Examples of affected surfaces on current main include:
omi config profile use 'bad[/bold]'
omi config set local_api_url 'http://127.0.0.1/[oops]' --profile 'bad[/bold]'
omi auth logout --profile 'bad[/bold]'
omi auth refresh --profile 'bad[/bold]' error details for API-key profiles
- local command task status messages that include task IDs
Expected behavior: CLI-owned Rich styling should remain available, but dynamic user/API fragments should be escaped before interpolation so commands render literally and preserve JSON/stdout contracts.
Proposed scope: escape only the dynamic fragments in these status/error messages and add focused regression tests using the existing Python CLI test fixtures. This is AI-assisted work from @JayyBG. Would maintainers consider a small US$5 PayPal bounty after acceptance and merge? No award is assumed, and payout details would be shared privately only if approved.
Several Python CLI status/error messages interpolate user-controlled profile names or config values directly into Rich markup strings. A profile name such as
bad[/bold]can make otherwise successful commands fail while rendering their message, after the config or auth state has already been changed.Examples of affected surfaces on current
maininclude:omi config profile use 'bad[/bold]'omi config set local_api_url 'http://127.0.0.1/[oops]' --profile 'bad[/bold]'omi auth logout --profile 'bad[/bold]'omi auth refresh --profile 'bad[/bold]'error details for API-key profilesExpected behavior: CLI-owned Rich styling should remain available, but dynamic user/API fragments should be escaped before interpolation so commands render literally and preserve JSON/stdout contracts.
Proposed scope: escape only the dynamic fragments in these status/error messages and add focused regression tests using the existing Python CLI test fixtures. This is AI-assisted work from @JayyBG. Would maintainers consider a small US$5 PayPal bounty after acceptance and merge? No award is assumed, and payout details would be shared privately only if approved.