Summary: | Pasting \n does not work | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Dmitri Koulikoff <kde> |
Component: | copy-paste | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED INTENTIONAL | ||
Severity: | normal | CC: | a.samirh78, cbc.alves, nate, oded, tcanabrava |
Priority: | NOR | ||
Version: | 20.12.1 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Copy new line |
Description
Dmitri Koulikoff
2021-01-16 15:31:56 UTC
If we did this, it would be possible for people to copy-paste malicious code they find online that executes immediately. It makes no difference for them as they will press Enter as well. Created attachment 135202 [details]
Copy new line
It is already possible to copy a new line, you have to select the line until the beginning of next line, this way it will select the '\n'.
Yes, it does insert, but not reacts. So I need to press Enter every time. It is very annoying. If you insist that new behaviour should exist, there should be a setting for it. Dmitri, I won't be adding a setting for this. I agree with the other users that this is a security concern, and it's doable that a ctrl + c on a website can inject malicius code, so you have the opportunity to check if the pasted command is indeed `ls -l` instead of `sudo rm -rf /` Press enter if you copy / paste code. or, create functions on your bashrc with the appropriate code that you are pasting so often. Best. I don't think this is specific to konsole; bash/readline has bracketed-paste, if it's enabled the shell will behave the way you describe. You can enable/disable bracketed-paste by editing /etc/inputrc and adding a line: set enable-bracketed-paste off See: https://www.gnu.org/software/bash/manual/bash.html#index-enable_002dbracketed_002dpaste https://www.gnu.org/software/bash/manual/bash.html#Readline-Init-File-Syntax (If you want the change to be in your user account only, you can also create a ~/.inputrc file: $include /etc/inputrc set enable-bracketed-paste off ) Note that bash/readline in recent versions have enabled bracketed-paste by default: https://lwn.net/Articles/839212/ thanks *** Bug 443292 has been marked as a duplicate of this bug. *** |