Commit 2cec49d4 authored by Kevin Chan's avatar Kevin Chan Committed by Joel Martin

If no password is provided, defaults to use no auth

parent 97bfe5ba
......@@ -260,11 +260,17 @@ init_msg: function () {
return;
}
var types = RQ.shiftBytes(num_types);
if ((types[0] != 1) && (types[0] != 2)) {
RFB.updateState('failed', "Disconnected: invalid security types list: " + types);
return;
}
RFB.auth_scheme = types[0];
if (RFB.password.length == 0) {
RFB.auth_scheme = 1;
} else {
RFB.auth_scheme = type[0];
}
RFB.send_array([RFB.auth_scheme]);
} else if (RFB.version == 3.3) {
if (RQ.length < 4) {
......@@ -289,8 +295,8 @@ init_msg: function () {
RFB.updateState('failed', "Disconnected: auth failure: " + reason);
return;
case 1: // no authentication
RFB.send_array([RFB.shared]); // ClientInitialisation
RFB.updateState('ServerInitialisation');
// RFB.send_array([RFB.shared]); // ClientInitialisation
RFB.updateState('SecurityResult');
break;
case 2: // VNC authentication
if (RQ.length < 16) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment