From 2830aaebf14a872b3b2e3fab696c47f2c1f5e489 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Fri, 28 Aug 2020 02:00:16 -0400 Subject: [PATCH] webaccess: Use `===` instead of `==` for comparison --- src/node/hooks/express/webaccess.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node/hooks/express/webaccess.js b/src/node/hooks/express/webaccess.js index eea5a35a2..152b34e4e 100644 --- a/src/node/hooks/express/webaccess.js +++ b/src/node/hooks/express/webaccess.js @@ -20,7 +20,7 @@ exports.basicAuth = (req, res, next) => { // Do not require auth for static paths and the API...this could be a bit brittle if (req.path.match(/^\/(static|javascripts|pluginfw|api)/)) return cb(true); - if (req.path.toLowerCase().indexOf('/admin') != 0) { + if (req.path.toLowerCase().indexOf('/admin') !== 0) { if (!settings.requireAuthentication) return cb(true); if (!settings.requireAuthorization && req.session && req.session.user) return cb(true); } @@ -115,7 +115,7 @@ exports.expressConfigure = (hook_name, args, cb) => { // If the log level specified in the config file is WARN or ERROR the application server never starts listening to requests as reported in issue #158. // Not installing the log4js connect logger when the log level has a higher severity than INFO since it would not log at that level anyway. - if (!(settings.loglevel === 'WARN' || settings.loglevel == 'ERROR')) + if (!(settings.loglevel === 'WARN' || settings.loglevel === 'ERROR')) args.app.use(log4js.connectLogger(httpLogger, {level: log4js.levels.DEBUG, format: ':status, :method :url'})); /* Do not let express create the session, so that we can retain a