From 1be845c4381e4d3ad0aa79009f9d454715aac6b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 8 Feb 2019 10:01:48 +0200 Subject: [PATCH] MXS-2322: Fix maxctrl authentication The username and password are now explicitly passed to request instead of being added into the URI manually. --- maxctrl/lib/common.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maxctrl/lib/common.js b/maxctrl/lib/common.js index 405d2e59d..379508d42 100644 --- a/maxctrl/lib/common.js +++ b/maxctrl/lib/common.js @@ -245,7 +245,7 @@ module.exports = function() { base = 'https://' } - return base + argv.u + ':' + argv.p + '@' + host + '/v1/' + endpoint + return base + host + '/v1/' + endpoint } this.OK = function() { @@ -283,6 +283,7 @@ module.exports = function() { this.doAsyncRequest = function(host, resource, cb, obj) { args = obj || {} args.uri = getUri(host, this.argv.secure, resource) + args.auth = {user: argv.u, pass: argv.p} args.json = true args.timeout = this.argv.timeout setTlsCerts(args)