summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mannehed <samuel@cendio.se>2017-02-18 20:39:57 +0100
committerSamuel Mannehed <samuel@cendio.se>2017-02-18 20:39:57 +0100
commitf78a652e862f3c5f582b2dffcd084711ca09e79c (patch)
tree42dec6529d844e8056cb50e7b180ac731d0a6d5e
parent0298305e809bb77b1121ec3cd0096f239c0ca427 (diff)
downloadnovnc-f78a652e862f3c5f582b2dffcd084711ca09e79c.tar.gz
Don't send or recieve clipboard in view_only
-rw-r--r--core/rfb.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/rfb.js b/core/rfb.js
index e26e7b1..eb93971 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();