mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-10 14:14:48 +02:00
Consider \r dangerous without bracketed paste
This commit is contained in:
@@ -1470,7 +1470,7 @@ class Window:
|
||||
btext = text.encode('utf-8')
|
||||
if 'confirm' in opts.paste_actions:
|
||||
sanitized = sanitize_control_codes(text)
|
||||
if sanitized != text:
|
||||
if sanitized != text or (not self.screen.in_bracketed_paste_mode and re.search(r'[\r\n]', text) is not None):
|
||||
msg = _('The text to be pasted contains terminal control codes.\n\nIf the terminal program you are pasting into does not properly'
|
||||
' sanitize pasted text, this can lead to \x1b[31mcode execution vulnerabilities\x1b[39m.\n\nHow would you like to proceed?')
|
||||
get_boss().choose(
|
||||
|
||||
Reference in New Issue
Block a user