Skip to content

Commit e914e76

Browse files
test(server): decoded U+009C inside an OSC query leaks payload into history
Reproduces #36012. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent d06ba27 commit e914e76

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎apps/server/src/terminal/Manager.test.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,6 +1468,19 @@ it.layer(
14681468
}),
14691469
);
14701470

1471+
it.effect("keeps a decoded U+009C inside a stripped OSC query out of history", () =>
1472+
Effect.gen(function* () {
1473+
const { manager, ptyAdapter } = yield* createManager();
1474+
yield* manager.open(openInput());
1475+
const process = ptyAdapter.processes[0]!;
1476+
// libghostty receives UTF-8 (c2 9c), which is OSC payload; only ESC \ ends this string.
1477+
process.emitData("A\u001b]11;?\u009cHIDDEN\u001b\\B\n");
1478+
yield* manager.close({ threadId: "thread-1" });
1479+
1480+
expect((yield* manager.open(openInput())).history).toMatch(/^AB\n/);
1481+
}),
1482+
);
1483+
14711484
it.effect("preserves large chunked OSC 52 and DCS strings across reopen", () =>
14721485
Effect.gen(function* () {
14731486
const { manager, ptyAdapter, logsDir } = yield* createManager();

0 commit comments

Comments
 (0)