diff --git a/.eslintrc.yml b/.eslintrc.yml index de36b033..bb29017c 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -33,6 +33,7 @@ rules: no-trailing-spaces: 2 no-unsafe-negation: 2 no-useless-escape: 2 + no-useless-return: 2 object-curly-spacing: [2, never] quote-props: [2, as-needed] quotes: [2, double, avoid-escape] diff --git a/client/css/style.css b/client/css/style.css index ce41be48..52910002 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -25,8 +25,8 @@ font-weight: normal; font-style: normal; src: - url("../fonts/fontawesome-webfont.woff2?v=4.6.3") format("woff2"), - url("../fonts/fontawesome-webfont.woff?v=4.6.3") format("woff"); + url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"), + url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"); } html, diff --git a/client/js/lounge.js b/client/js/lounge.js index 1eab796b..1be5ea8b 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -512,7 +512,7 @@ $(function() { for (var i in options) { if (i === "userStyles") { - if (!/[\?&]nocss/.test(window.location.search)) { + if (!/[?&]nocss/.test(window.location.search)) { $(document.head).find("#user-specified-css").html(options[i]); } settings.find("#user-specified-css-input").val(options[i]); diff --git a/package.json b/package.json index 9b822647..f640b61e 100644 --- a/package.json +++ b/package.json @@ -41,31 +41,31 @@ }, "dependencies": { "bcrypt-nodejs": "0.0.3", - "cheerio": "0.20.0", + "cheerio": "0.22.0", "colors": "1.1.2", "commander": "2.9.0", - "event-stream": "3.3.2", - "express": "4.13.4", - "fs-extra": "0.30.0", + "event-stream": "3.3.4", + "express": "4.14.0", + "fs-extra": "1.0.0", "irc-framework": "2.5.0", - "lodash": "4.11.2", - "moment": "2.13.0", + "lodash": "4.17.2", + "moment": "2.16.0", "read": "1.0.7", - "request": "2.74.0", - "semver": "5.1.0", - "socket.io": "1.4.5", - "spdy": "3.3.2", - "ldapjs": "1.0.0" + "request": "2.79.0", + "semver": "5.3.0", + "socket.io": "1.5.1", + "spdy": "3.4.4", + "ldapjs": "1.0.1" }, "devDependencies": { "chai": "3.5.0", - "eslint": "3.6.0", - "font-awesome": "4.6.3", - "handlebars": "4.0.5", + "eslint": "3.10.2", + "font-awesome": "4.7.0", + "handlebars": "4.0.6", "istanbul": "0.4.5", - "mocha": "3.0.2", - "npm-run-all": "3.1.0", - "stylelint": "7.3.1", + "mocha": "3.1.2", + "npm-run-all": "3.1.1", + "stylelint": "7.5.0", "uglify-js": "2.7.3" } } diff --git a/src/models/network.js b/src/models/network.js index b180f523..0ddd3530 100644 --- a/src/models/network.js +++ b/src/models/network.js @@ -44,7 +44,7 @@ Network.prototype.setNick = function(nick) { "(?:^|[^a-z0-9]|\x03[0-9]{1,2})" + // Escape nickname, as it may contain regex stuff - nick.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&") + + _.escapeRegExp(nick) + // Do not match characters and numbers "(?:[^a-z0-9]|$)", diff --git a/src/server.js b/src/server.js index f4ed7c72..7d98ec9b 100644 --- a/src/server.js +++ b/src/server.js @@ -281,7 +281,7 @@ function localAuth(client, user, password, callback) { } function ldapAuth(client, user, password, callback) { - var userDN = user.replace(/([,\\\/#+<>;"= ])/g, "\\$1"); + var userDN = user.replace(/([,\\/#+<>;"= ])/g, "\\$1"); var bindDN = Helper.config.ldap.primaryKey + "=" + userDN + "," + Helper.config.ldap.baseDN; var ldapclient = ldap.createClient({