[PR #6631] Add settings to warn about large or multiline pastes #26762

Open
opened 2026-01-31 09:18:00 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/6631

State: closed
Merged: Yes


Before sending calling the HandleClipboardData member function on
the PasteFromClipboardEventArgs object when we receive a request
from the TermControl to send it the clipboard's text content, we
now display a warning to let the user choose whether to continue or
not if the text is larger than 5 KiB or contains the new line
character, which can be a security issue if the user is pasting the
text in a shell.

These warnings can be disabled with the largePasteWarning and
multiLinePasteWarning global settings respectively.

Closes #2349

**Original Pull Request:** https://github.com/microsoft/terminal/pull/6631 **State:** closed **Merged:** Yes --- Before sending calling the `HandleClipboardData` member function on the `PasteFromClipboardEventArgs` object when we receive a request from the `TermControl` to send it the clipboard's text content, we now display a warning to let the user choose whether to continue or not if the text is larger than 5 KiB or contains the _new line_ character, which can be a security issue if the user is pasting the text in a shell. These warnings can be disabled with the `largePasteWarning` and `multiLinePasteWarning` global settings respectively. Closes #2349
claunia added the pull-request label 2026-01-31 09:18:00 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26762