From cf2ca71deecc218c1977de12bfa7d88cffc6f208 Mon Sep 17 00:00:00 2001 From: "sur.la.route" Date: Tue, 14 Jun 2022 07:42:53 -0500 Subject: [PATCH] prevent null workstation #'s from passing.. to axios-ntlm --- server/model/monitor.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index 7c269fe2..63fd3711 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -279,12 +279,18 @@ class Monitor extends BeanModel { if (this.auth_method === "ntlm") { options.httpsAgent.keepAlive = true; - res = await httpNtlm(options, { + let ntlmOptions = + { username: this.basic_auth_user, password: this.basic_auth_pass, domain: this.authDomain, - workstation: this.authWorkstation, - }); + } + + if (this.authWorkstation) { + ntlmOptions.workstation= this.authWorkstation; + } + + res = await httpNtlm(options, ntlmOptions); } else { res = await axiosClient.request(options);