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:
rustdeskandClaude Opus 5.5 committed 2026-09-24 15:08:11 +08:00
1 parent 58ff78a823
commit bebbe60a14
1 file changed
+3 -1
+3 -1
View File
@@ -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")]