mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 00:02:23 +00:00
tty7 has a `ClipboardLoad` arm that reads the system clipboard and writes it back down the PTY, and nothing in this crate says that must not happen. It does not happen — `alacritty_terminal` refuses a paste request before it becomes an event, because `Config::osc52` defaults to `OnlyCopy` — but that is the VT crate's decision, taken by a field tty7 never sets, protecting a handler tty7 has already written. So the exposure is one upstream default away: a release that moved `osc52` to `CopyPaste` would hand any program able to write to a pane whatever is on the clipboard, with no prompt and nothing in the sequence identifying who asked. The program can be on the far end of an SSH connection, and a clipboard routinely holds a password, a token or a private key. Terminals that offer the read at all put it behind a prompt or an explicit opt-in. `osc52: Osc52::OnlyCopy` is now stated where the rest of the terminal config is, so writes still work and reads stay refused by tty7's own decision. No behaviour change today. Same shape as `conpty_resize` two lines up, and it gets the same kind of test, for the reason that one documents: a field whose default already matches is a field whose line can vanish unnoticed. The `ClipboardLoad` arm keeps a note saying what makes it unreachable and that unlocking it needs a consent step first. 2937 tests pass.