From 980c2652ac84aa7f97af12f774f02fe55f509f99 Mon Sep 17 00:00:00 2001 From: Dmitry Sankevich Date: Wed, 16 Dec 2015 15:35:23 +0600 Subject: [PATCH] fix select 'no-auth' when empty sub-auth types received on tight security sub-auth negotiation --- include/rfb.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/rfb.js b/include/rfb.js index dfd9269c..29be0585 100644 --- a/include/rfb.js +++ b/include/rfb.js @@ -795,6 +795,11 @@ var RFB; // second pass, do the sub-auth negotiation if (this._sock.rQwait("sub auth count", 4)) { return false; } var subAuthCount = this._sock.rQshift32(); + if (subAuthCount === 0) { // empty sub-auth list received means 'no auth' subtype selected + this._updateState('SecurityResult'); + return true; + } + if (this._sock.rQwait("sub auth capabilities", 16 * subAuthCount, 4)) { return false; } var clientSupportedTypes = {