mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-28 09:39:05 +02:00
Treat ExtendedClipboard messages with the Caps bit as Caps regardless of co-set action bits
This commit is contained in:
@@ -139,11 +139,16 @@ func (s *session) handleExtCutText(payloadLen uint32) error {
|
|||||||
formats := flags & extClipFormatMask
|
formats := flags & extClipFormatMask
|
||||||
rest := buf[4:]
|
rest := buf[4:]
|
||||||
|
|
||||||
switch action {
|
// A Caps message sets the Caps bit alongside one bit per action the
|
||||||
case extClipActionCaps:
|
// peer supports, so the action byte is multi-bit. Detect it first; the
|
||||||
|
// remaining actions are single-bit and are dispatched after.
|
||||||
|
if action&extClipActionCaps != 0 {
|
||||||
// Client max sizes are informational for us today: we only emit
|
// Client max sizes are informational for us today: we only emit
|
||||||
// text and already cap it at extClipMaxText.
|
// text and already cap it at extClipMaxText.
|
||||||
return nil
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
switch action {
|
||||||
case extClipActionRequest:
|
case extClipActionRequest:
|
||||||
if formats&extClipFormatText != 0 {
|
if formats&extClipFormatText != 0 {
|
||||||
return s.sendExtClipProvideText()
|
return s.sendExtClipProvideText()
|
||||||
|
|||||||
Reference in New Issue
Block a user