From 8ecd0dd9e858b9c80acc72547bc540e277d21045 Mon Sep 17 00:00:00 2001 From: muxator Date: Sun, 3 Mar 2019 00:30:12 +0100 Subject: [PATCH] STRICT CHECK NOT PRESENT IN RAY's WORK. Should be there for coherency? --- src/node/db/AuthorManager.js | 2 +- src/node/db/SecurityManager.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/node/db/AuthorManager.js b/src/node/db/AuthorManager.js index e616b7af123..d04c4ca3246 100644 --- a/src/node/db/AuthorManager.js +++ b/src/node/db/AuthorManager.js @@ -98,7 +98,7 @@ function mapAuthorWithDBKey (mapperkey, mapper, callback) db.get(mapperkey + ":" + mapper, function(err, author) { if (ERR(err, callback)) return; - if (author == null) { + if (author === null) { // there is no author with this mapper, so create one exports.createAuthor(null, function(err, author) { if (ERR(err, callback)) return; diff --git a/src/node/db/SecurityManager.js b/src/node/db/SecurityManager.js index c7afde8fb69..bc8f59426f0 100644 --- a/src/node/db/SecurityManager.js +++ b/src/node/db/SecurityManager.js @@ -225,7 +225,7 @@ exports.checkAccess = function(padID, sessionCookie, token, password, callback) // --> grant access statusObject = { accessStatus: "grant", authorID: sessionAuthor }; - } else if (isPasswordProtected && passwordStatus == "correct") { + } else if (isPasswordProtected && passwordStatus === "correct") { // - the pad is password protected and password is correct // --> grant access @@ -235,7 +235,7 @@ exports.checkAccess = function(padID, sessionCookie, token, password, callback) // --> deny access, ask for new password and tell them that the password is wrong statusObject = { accessStatus: "wrongPassword" }; - } else if (isPasswordProtected && passwordStatus == "notGiven") { + } else if (isPasswordProtected && passwordStatus === "notGiven") { // - the pad is password protected but no password given // --> ask for password @@ -271,7 +271,7 @@ exports.checkAccess = function(padID, sessionCookie, token, password, callback) // --> deny access, ask for new password and tell them that the password is wrong statusObject = {accessStatus: "wrongPassword"}; - } else if (isPublic && isPasswordProtected && passwordStatus == "notGiven") { + } else if (isPublic && isPasswordProtected && passwordStatus === "notGiven") { // - it's public and the pad is password protected but no password given // --> ask for password