Skip to content

Commit 27089be

Browse files
authored
fix(NODE-3109): prevent servername from being an IP (#2771)
1 parent 146791c commit 27089be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmap/connect.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ function parseSslOptions(options: ConnectionOptions): TLSConnectionOpts {
248248
}
249249

250250
// Set default sni servername to be the same as host
251-
if (result.servername == null) {
251+
if (result.servername == null && result.host && !net.isIP(result.host)) {
252252
result.servername = result.host;
253253
}
254254

0 commit comments

Comments
 (0)