From f78a652e862f3c5f582b2dffcd084711ca09e79c Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Sat, 18 Feb 2017 20:39:57 +0100 Subject: [PATCH] Don't send or recieve clipboard in view_only --- core/rfb.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/rfb.js b/core/rfb.js index e26e7b12..eb939712 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -343,7 +343,7 @@ }, clipboardPasteFrom: function (text) { - if (this._rfb_connection_state !== 'connected') { return; } + if (this._rfb_connection_state !== 'connected' || this._view_only) { return; } RFB.messages.clientCutText(this._sock, text); }, @@ -1189,6 +1189,8 @@ _handle_server_cut_text: function () { Util.Debug("ServerCutText"); + if (this._view_only) { return true; } + if (this._sock.rQwait("ServerCutText header", 7, 1)) { return false; } this._sock.rQskipBytes(3); // Padding var length = this._sock.rQshift32();