@mountainpass/addressr 2.6.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/src/read-shadow.js +6 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
package/lib/src/read-shadow.js
CHANGED
|
@@ -95,7 +95,12 @@ function buildClientOptions(environment) {
|
|
|
95
95
|
const protocol = environment[PROTOCOL_VAR] || 'https';
|
|
96
96
|
const username = environment[USERNAME_VAR];
|
|
97
97
|
const password = environment[PASSWORD_VAR];
|
|
98
|
-
|
|
98
|
+
// P035 production-discovered bug: base64-derived passwords commonly contain
|
|
99
|
+
// '/', '+', '=', ':' which are URL-reserved. Without encoding, the resulting
|
|
100
|
+
// node URL `https://user:pa/ss@host:443` makes `new Client(...)` throw
|
|
101
|
+
// synchronously (URL parser treats '/' as path delimiter). Encode the
|
|
102
|
+
// credentials so any password the operator generates is safe.
|
|
103
|
+
const node = isNonEmpty(username) ? `${protocol}://${encodeURIComponent(username)}:${encodeURIComponent(password)}@${host}:${port}` : `${protocol}://${host}:${port}`;
|
|
99
104
|
return {
|
|
100
105
|
node
|
|
101
106
|
};
|
package/lib/version.js
CHANGED