connection: bind the port-forward multiplex flag into the login scope digest

The hbb_common bump brings `PortForward.multiplex`, and the exhaustive
destructuring in login_scope_digest exists to force this decision on every
new field. A multiplexed tunnel takes its targets per channel rather than
from this login, so a retry that flips the flag asks for a different scope
than the one that was approved.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019aokqJuhjvB3kijXtAg5Ns
This commit is contained in:
rustdesk
2026-09-04 23:42:25 +08:00
parent b473977aa8
commit c4df2e6da2

View File

@@ -2576,11 +2576,13 @@ impl Connection {
let PortForward {
host,
port,
multiplex,
special_fields: _,
} = pf;
push(b"port_forward");
push(host.as_bytes());
push(&port.to_le_bytes());
push(&[*multiplex as u8]);
}
// Variants this build does not know execute as remote, so they latch as remote.
None | Some(_) => push(b"remote"),