diff --git a/packages/xen-api/src/index.js b/packages/xen-api/src/index.js index 1ecb32680..ffbb93597 100644 --- a/packages/xen-api/src/index.js +++ b/packages/xen-api/src/index.js @@ -122,7 +122,14 @@ const parseUrl = url => { } const [, protocol = 'https:', username, password, hostname, port] = matches - return { protocol, username, password, hostname, port } + const parsedUrl = { protocol, hostname, port } + if (username !== undefined) { + parsedUrl.username = decodeURIComponent(username) + } + if (password !== undefined) { + parsedUrl.password = decodeURIComponent(password) + } + return parsedUrl } // -------------------------------------------------------------------