Skip to content

Commit bcab0f9

Browse files
committed
fix: dont parse tls/ssl file paths in uri
1 parent 625f7c6 commit bcab0f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/core/uri_parser.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,9 @@ function parseQueryString(query, options) {
424424
}
425425

426426
const normalizedKey = key.toLowerCase();
427-
const parsedValue = parseQueryStringItemValue(normalizedKey, value);
427+
// skip parsing for tls/ssl values to avoid issues with Windows file paths (containing colons)
428+
const skipParse = /^(?:ssl|tls)/.test(normalizedKey);
429+
const parsedValue = skipParse ? value : parseQueryStringItemValue(normalizedKey, value);
428430
applyConnectionStringOption(result, normalizedKey, parsedValue, options);
429431
}
430432

0 commit comments

Comments
 (0)