mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-10-23 20:21:24 +00:00
fix(clipboard): unix, check file transfer permission on incoming file clipboard
The Cliprdr arm served incoming file clipboard messages on Linux/macOS without checking the file transfer permission, which the controlled side can turn off mid-session. can_sub_file_clipboard_service() only gates the outgoing service, so a peer could keep pushing files in and keep requesting the host's copied file list and contents. Check file_transfer_enabled() on every message. It is the same permission the client and the Windows cm use for file copy-paste. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
58ff78a823
commit
bebbe60a14
1 file changed
+3
-1
@@ -3393,7 +3393,9 @@ impl Connection {
|
||||
self.send_to_cm(ipc::Data::ClipboardFile(clip));
|
||||
}
|
||||
#[cfg(feature = "unix-file-copy-paste")]
|
||||
if crate::is_support_file_copy_paste(&self.lr.version) {
|
||||
if crate::is_support_file_copy_paste(&self.lr.version)
|
||||
&& self.file_transfer_enabled()
|
||||
{
|
||||
let mut out_msgs = vec![];
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
|
||||
Reference in new issue
Block a user