diff options
author | Fedor Indutny <fedor.indutny@gmail.com> | 2012-07-20 22:07:16 +0400 |
---|---|---|
committer | Fedor Indutny <fedor.indutny@gmail.com> | 2012-07-20 22:07:16 +0400 |
commit | 85185bbbaa9e99bd77232f529687e9fa5d26af78 (patch) | |
tree | 3b8431fcee6a99c25475af13e5dc67282d882f2b /lib | |
parent | 92e7433ff9f7e7bf051073978309ec392e329397 (diff) | |
download | nodejs-85185bbbaa9e99bd77232f529687e9fa5d26af78.tar.gz nodejs-85185bbbaa9e99bd77232f529687e9fa5d26af78.tar.bz2 nodejs-85185bbbaa9e99bd77232f529687e9fa5d26af78.zip |
tls: pass linting
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tls.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/tls.js b/lib/tls.js index 3095bd478..55acac7ff 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -97,12 +97,11 @@ function checkServerIdentity(host, cert) { // escape all characters that have special meaning in regexps // (i.e. '.', '[', '{', '*', and others) var re = host.replace( - /\*([a-z0-9\\-_\.])|[\.,\-\\\^\$+?*\[\]\(\):!\|{}]/g, - function(all, sub) { - if (sub) return '[a-z0-9\\-_]*' + (sub === '-' ? '\\-' : sub); - return '\\' + all; - } - ); + /\*([a-z0-9\\-_\.])|[\.,\-\\\^\$+?*\[\]\(\):!\|{}]/g, + function(all, sub) { + if (sub) return '[a-z0-9\\-_]*' + (sub === '-' ? '\\-' : sub); + return '\\' + all; + }); return new RegExp('^' + re + '$', 'i'); } @@ -163,7 +162,7 @@ function checkServerIdentity(host, cert) { } return valid; -}; +} exports.checkServerIdentity = checkServerIdentity; |