diff --git a/core/rfb.js b/core/rfb.js index a4b5417e..a33d767b 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -836,13 +836,13 @@ RFB.prototype = { }, _negotiate_std_vnc_auth: function () { + if (this._sock.rQwait("auth challenge", 16)) { return false; } + if (this._rfb_password.length === 0) { this._onPasswordRequired(this); return false; } - if (this._sock.rQwait("auth challenge", 16)) { return false; } - // TODO(directxman12): make genDES not require an Array var challenge = Array.prototype.slice.call(this._sock.rQshiftBytes(16)); var response = RFB.genDES(this._rfb_password, challenge);