[Konsole-devel] [konsole] [Bug 89299] prevent paste of newline characters

Dimitri Nüscheler dimitri.nuescheler at sunrise.ch
Sat Nov 9 11:36:44 UTC 2013


https://bugs.kde.org/show_bug.cgi?id=89299

--- Comment #52 from Dimitri Nüscheler <dimitri.nuescheler at sunrise.ch> ---
Since this bug https://bugs.kde.org/show_bug.cgi?id=318524
is a duplicate of this one, I copy & paste the solution proposal

Recommended behaviour:

As the user uses "Paste", the clipboard is appended to an initially empty
konsole-session owned buffer asserting that the last character is LF (append if
none there). If the buffer was empty:
Scan the buffer till the first LF, send that part to shell (LF excluded) and
delete from buffer (LF included). This step is called dequeue.

As the user sends Enter/Return to shell and the buffer is not empty: dequeue -
this should execute the first line and at the same time have the next line sent
to shell, but without the LF so it won't execute immediately.

On user request the buffer is cleared.

This improves security, because the user is able to review a command he copied
from an online tutorial which (if malicious) might contain commands which were
not visible as it was copied. (Secure)

If the command contains parts which should be modified to user needs, the user
is now able to. (Flexible)

After execution of a command, the user is able to review its execution and to
decide whether to proceed. (Reviewable)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list