From def14d69dbac608a5ceaab5cfbcacdaf20556c04 Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Thu, 25 Mar 2021 12:23:58 -0400 Subject: [PATCH] fix(NODE-3109): prevent servername from being IP servername should only ever be a hostname. Add a condition to check if the host is an IP and skip auto setting the servername. --- lib/core/connection/connect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/connection/connect.js b/lib/core/connection/connect.js index 05125a3d4e..bd10535466 100644 --- a/lib/core/connection/connect.js +++ b/lib/core/connection/connect.js @@ -243,7 +243,7 @@ function parseSslOptions(family, options) { } // Set default sni servername to be the same as host - if (result.servername == null) { + if (result.servername == null && !net.isIP(result.host)) { result.servername = result.host; }