Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit a02fcaa4 authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark Committed by Kurt Hindenburg

Remove ESC sequences from pastes in bracketed mode

Due to copy/paste exploits detailed in below links, remove all \033
from paste in bracketed mode.

See https://phabricator.kde.org/D11859
See https://bugs.kde.org/show_bug.cgi?id=392554

(cherry picked from commit 0b482990)
parent 6aad0aa4
......@@ -3165,6 +3165,7 @@ void TerminalDisplay::doPaste(QString text, bool appendReturn)
if (!text.isEmpty()) {
text.replace(QLatin1Char('\n'), QLatin1Char('\r'));
if (bracketedPasteMode()) {
text.remove(QLatin1String("\033"));
text.prepend(QLatin1String("\033[200~"));
text.append(QLatin1String("\033[201~"));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment