Repository navigation
air: strip control characters from server-supplied names in air list and air get - #7601
Merged
Merged
Conversation
dimk0
pushed a commit
that referenced
this pull request
Nov 13, 2026
Co-authored-by: Isaac <[email protected]>
dimk0
pushed a commit
that referenced
this pull request
Nov 13, 2026
Co-authored-by: Isaac <[email protected]>
Contributor
|
Commit: Regression test reportSelected 1 changed tests (limit=20, 0 not selected) 1 tests: regression=1 unreleased=0 coverage=0 failing=0
TestAccept/air/control-chars: branch ✅ | main (bdb37ab) ❌ | latest (v1.26.0) ❌main (bdb37ab): latest (v1.26.0): |
Collaborator
✅ Integration test reportCommit: 2118b25
Top 3 slowest tests (at least 2 minutes):
|
dimk0
pushed a commit
that referenced
this pull request
Nov 13, 2026
The fragment belongs to PR #7601's branch, not this one; here it fails the changelog validator because its link does not include #7598. This reverts commit 95e6c90. Co-authored-by: Isaac <[email protected]>
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 14, 2026
…and air get `air list` and `air get` showed the MLflow run name, experiment name and user name as the server sent them, so a name carrying terminal escape sequences reached the terminal of anyone who listed the run. A new `stripControl` helper drops escape sequences (CSI, OSC, DCS, ...) and C0/C1 control characters, and is applied where those names become display values: the MLflow run name as it is fetched (before it is shortened or cached), each `air list` table cell, and the Experiment, MLflow Run and User fields of the `air get` box and the `air list` info pane. JSON output and link targets are unchanged. Internal ticket: CNXT-2620. Co-authored-by: Isaac <[email protected]>
Co-authored-by: Isaac <[email protected]>
dimk0
force-pushed
the
air-strip-control-chars
branch
from
November 14, 2026 02:46
fe99575 to
2118b25
Compare
dimk0
enabled auto-merge
November 14, 2026 02:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
stripControlhelper incmd/airremoves terminal escape sequences (CSI, OSC, DCS, ...) and C0/C1 control characters from a string. Printable text, including non-ASCII, is kept.fetchMLflowRunName), before it is shortened to the column width or written to theair listcache;air listtable cell (cell), which also covers rows read from a cache written before this change;air getbox and theair listinfo pane (renderFields).air logsare out of scope: training logs legitimately contain colour codes.Why
air listandair getprinted the MLflow run name, experiment name and user name exactly as the server sent them. A name carrying a set-window-title sequence (OSC 0), a clear-screen sequence (CSI 2J) or a carriage return reached the terminal of anyone who listed the run, for example with--all-users, so whoever named a run could clear the screen, retitle the window, write the clipboard (OSC 52) or overwrite a line so a fake row appeared. Not code execution; low to moderate severity. Pre-existing before #7582. Internal ticket: CNXT-2620.Tests
TestStripControl: OSC terminated by BEL and by ST, OSC 52, CSI clear-screen and colour, carriage return, tab and newline, DEL, C1 controls, NUL, a two-byte escape sequence, a trailing ESC; plain and non-ASCII text are unchanged.TestFetchMLflowRunNamegains a case where the MLflow API returns a name with an OSC, a CSI and a carriage return.TestRenderFieldsStripsControlCharactersandTestRenderRowStripsControlCharacterscover theair getbox and theair listrow, and check that column widths still line up.acceptance/air/control-chars:air getandair listtext output with escapes in the run name, experiment name and creator;air list -o jsonshows the strings passed through unchanged. Verified to fail without the fix.This pull request and its description were written by Isaac.