]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Don't send or recieve clipboard in view_only
authorSamuel Mannehed <samuel@cendio.se>
Sat, 18 Feb 2017 19:39:57 +0000 (20:39 +0100)
committerSamuel Mannehed <samuel@cendio.se>
Sat, 18 Feb 2017 19:39:57 +0000 (20:39 +0100)
core/rfb.js

index e26e7b128ea698d793cde16272f6248732abfb48..eb93971285b26d1ab64cb876c2d0b30b6423ae2f 100644 (file)
         },
 
         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);
         },
 
 
         _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();