Skip to content

Commit 85185bb

Browse files
committed
tls: pass linting
1 parent 92e7433 commit 85185bb

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lib/tls.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,11 @@ function checkServerIdentity(host, cert) {
9797
// escape all characters that have special meaning in regexps
9898
// (i.e. '.', '[', '{', '*', and others)
9999
var re = host.replace(
100-
/\*([a-z0-9\\-_\.])|[\.,\-\\\^\$+?*\[\]\(\):!\|{}]/g,
101-
function(all, sub) {
102-
if (sub) return '[a-z0-9\\-_]*' + (sub === '-' ? '\\-' : sub);
103-
return '\\' + all;
104-
}
105-
);
100+
/\*([a-z0-9\\-_\.])|[\.,\-\\\^\$+?*\[\]\(\):!\|{}]/g,
101+
function(all, sub) {
102+
if (sub) return '[a-z0-9\\-_]*' + (sub === '-' ? '\\-' : sub);
103+
return '\\' + all;
104+
});
106105

107106
return new RegExp('^' + re + '$', 'i');
108107
}
@@ -163,7 +162,7 @@ function checkServerIdentity(host, cert) {
163162
}
164163

165164
return valid;
166-
};
165+
}
167166
exports.checkServerIdentity = checkServerIdentity;
168167

169168

0 commit comments

Comments
 (0)