File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,8 @@ const kPskIdentityHint = Symbol('pskidentityhint');
111111const kPendingSession = Symbol ( 'pendingSession' ) ;
112112const kIsVerified = Symbol ( 'verified' ) ;
113113
114+ const kRegExpEscapedStar = RegExpEscape ( '*' ) ;
115+
114116const noop = ( ) => { } ;
115117
116118let tlsTracingWarned = false ;
@@ -1542,7 +1544,7 @@ Server.prototype.addContext = function(servername, context) {
15421544 throw new ERR_TLS_REQUIRED_SERVER_NAME ( ) ;
15431545 }
15441546
1545- const re = new RegExp ( `^${ RegExpEscape ( servername ) . replace ( / (?< = [ ^ \\ ] | ^ ) \\ \* / g , '[^.]+' ) } $` ) ;
1547+ const re = new RegExp ( `^${ RegExpEscape ( servername ) . replaceAll ( kRegExpEscapedStar , '[^.]+' ) } $` ) ;
15461548
15471549 const secureContext =
15481550 context instanceof common . SecureContext ? context : tls . createSecureContext ( context ) ;
You can’t perform that action at this time.
0 commit comments