GNOME Bugzilla – Bug 794653
Filter out backspace when pasting
Last modified: 2018-04-09 08:56:54 UTC
Continuing bug 753197, shouldn't we also filter out BS and DEL? See also https://unix.stackexchange.com/questions/429897/why-does-linux-allow-backspaces-when-pasting-text-into-a-shell – seems to me there was no use case brought up for allowing these chars.
I believe there is at least one valid use case. Pasting control characters is an easy way to save time on doing repetitive tasks. You can put all command keys you want to send to a program in a text file and paste them to the terminal. Please see https://bugzilla.gnome.org/show_bug.cgi?id=753197#c9. I agree that we should filter all ASCII control characters except for tabs and newlines by default for security reasons, but I think we should also provide an option for users who really want to paste control characters to disable the filter. xterm has 'AllowPasteControls', but vte doesn't seem to have an equivalent option. This is not a hypothetical use case. The reason that I left a comment in bug 753197 was that I suddenly found that I could not paste a colored article to a BBS site. I can imagine that pasting BS and DEL is still useful for people who want to delete a lot of things managed by TUI programs.
We should include BS and DEL, yes.