diff --git a/src/Widgets/TerminalWidget.vala b/src/Widgets/TerminalWidget.vala index 65109a32a3..dee5445593 100644 --- a/src/Widgets/TerminalWidget.vala +++ b/src/Widgets/TerminalWidget.vala @@ -536,10 +536,11 @@ namespace Terminal { return; } + string? warn_text = null; - if ("\n" in text) { + if ("\n" in text || "&" in text || "|" in text || ";" in text ) { warn_text = _("The pasted text may contain multiple commands"); - } else if ("sudo" in text || "doas" in text) { + } else if ("sudo " in text || "doas " in text || "run0 " in text || "pkexec " in text || "su " in text) { warn_text = _("The pasted text may be trying to gain administrative access"); }