summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mannehed <samuel@cendio.se>2019-12-05 12:15:43 +0100
committerGitHub <noreply@github.com>2019-12-05 12:15:43 +0100
commitb39caa7469ee47cafc26087b9a50cbe40bbe44ae (patch)
tree92673884f91e60e0fda4a35fc0959bf7d4eb5044
parent80b078c469465f1ec45a5251a40eee51f13c5a1d (diff)
parent01d4514deed5e61d849c6f720b6f165a88f2e106 (diff)
downloadnovnc-b39caa7469ee47cafc26087b9a50cbe40bbe44ae.tar.gz
Merge pull request #1318 from chrisjdev/emptyPassword
Allow connecting with empty string credentials
-rw-r--r--core/rfb.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/rfb.js b/core/rfb.js
index dfcab7c..9ef369d 100644
--- a/core/rfb.js
+++ b/core/rfb.js
@@ -940,9 +940,9 @@ export default class RFB extends EventTargetMixin {
// authentication
_negotiate_xvp_auth() {
- if (!this._rfb_credentials.username ||
- !this._rfb_credentials.password ||
- !this._rfb_credentials.target) {
+ if (this._rfb_credentials.username === undefined ||
+ this._rfb_credentials.password === undefined ||
+ this._rfb_credentials.target === undefined) {
this.dispatchEvent(new CustomEvent(
"credentialsrequired",
{ detail: { types: ["username", "password", "target"] } }));
@@ -961,7 +961,7 @@ export default class RFB extends EventTargetMixin {
_negotiate_std_vnc_auth() {
if (this._sock.rQwait("auth challenge", 16)) { return false; }
- if (!this._rfb_credentials.password) {
+ if (this._rfb_credentials.password === undefined) {
this.dispatchEvent(new CustomEvent(
"credentialsrequired",
{ detail: { types: ["password"] } }));