From 42c6952edb5cfccd708bea8a9a6c02c67641a314 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Fri, 20 Jul 2012 22:07:16 +0400 Subject: [PATCH] tls: pass linting --- lib/tls.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/tls.js b/lib/tls.js index 089ad9bab9e..05e48d03a97 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;