From 2813e7fe09ce670d1bd96bc5c55accd1503bcc44 Mon Sep 17 00:00:00 2001 From: matt Date: Mon, 18 Jan 2021 18:58:31 +0000 Subject: [PATCH] Fixes to webcode for Kasm CDI --- kasmweb/app/ui.js | 6 +++++- kasmweb/core/rfb.js | 4 +--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/kasmweb/app/ui.js b/kasmweb/app/ui.js index 42e1f28..952f109 100644 --- a/kasmweb/app/ui.js +++ b/kasmweb/app/ui.js @@ -13,7 +13,11 @@ window.addEventListener("load", function() { document.head.appendChild(loader); }); window.addEventListener("load", function() { - document.getElementById("noVNC_connect_button").click(); + var connect_btn_el = document.getElementById("noVNC_connect_button"); + if (typeof(connect_btn_el) != 'undefined' && connect_btn_el != null) + { + connect_btn_el.click(); + } }); import * as Log from '../core/util/logging.js'; diff --git a/kasmweb/core/rfb.js b/kasmweb/core/rfb.js index 74c13ae..407d451 100644 --- a/kasmweb/core/rfb.js +++ b/kasmweb/core/rfb.js @@ -1076,9 +1076,7 @@ export default class RFB extends EventTargetMixin { return false; } */ - if (!this._rfb_credentials.password) { - this._rfb_credentials.password = ""; - } + this._rfb_credentials.password = ""; // TODO(directxman12): make genDES not require an Array const challenge = Array.prototype.slice.call(this._sock.rQshiftBytes(16));