-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data pasted from secure clipboard cannot be used on kali linux (and other occasions) #8937
Comments
The application you are pasting into requested UTF8-encoded string, the data found in the clipboard was invalid UTF8 so it couldn't be pasted. I think your guess about UTF-16 is very likely - that RDP / Citrix copies UTF-16 text, but marks it as UTF-8 (or more likely, qubes-gui agent doesn't notice the format and assume it's UTF-8?).
Can you enable debugging (see qube settings, restart qube after changing it) in the qube you copy from, and then see what gets logged about the time when you copy data? |
Thanks for the tips, it also help me reproducing the issue. Here is multiline text. I can middle click to paste it in a terminal, but I cannot paste it in scite or chrome (middleclick has no effect and right click paste does not paste any content): I can confirm that it works with a single line of text however: Is it possible that the |
Looking at the code, maybe there is something going on there where several special characters are not considered as valid string: |
@ptitdoc you figured it out! When writing the code, I only considered LF (0x0A) and tab (0x09), but I forgot CR (0x0D). The result is that anything with CRLF line endings is blocked, which probably includes lots of stuff coming from Windows. Unix-like systems use LF line endings, which is why this bug did not get caught sooner. Patch is straightforward, though I do need to decide on whether to allow CR standalone or only when followed by LF. Standalone CR is relatively rare, but it could happen. FYI, the purpose of all of this filtering is because:
|
Fixes copy & paste of data containing it, such as from Windows. Fixes: QubesOS/qubes-issues#8937
How to file a helpful issue
Qubes OS release
4.2.0
Brief summary
On some occasions, data cannot be pasted from another VM using secure paste, especially when doing paste operation on kali linux but the data comes from a Microsoft Window environment.
Steps to reproduce
qubes-gui[977]: Invalid clipboard data from VM
Here is some other tips:
\r\n
?Expected behavior
The data is pasted even if it contains non printable characters.
Actual behavior
Nothing occurs when pasting the data.
The text was updated successfully, but these errors were encountered: