From ddce6ec5b72799fc0f9c533cea7c482708596636 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 18 Dec 2022 14:21:38 -0600 Subject: [PATCH] Fix hashPass and remove error code return on authorize --- server/Auth.js | 2 +- server/controllers/MiscController.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/server/Auth.js b/server/Auth.js index fe33128fe..39e8ee95f 100644 --- a/server/Auth.js +++ b/server/Auth.js @@ -100,7 +100,7 @@ class Auth { } generateRandomPasswordHash() { - return hashPass(getId()) + return this.hashPass(getId()) } generateAccessToken(payload) { diff --git a/server/controllers/MiscController.js b/server/controllers/MiscController.js index 21dddf895..c1b4bd245 100644 --- a/server/controllers/MiscController.js +++ b/server/controllers/MiscController.js @@ -123,8 +123,7 @@ class MiscController { // When authorizing an API token and forward auth is enabled then validate user using forward auth headers if (global.ForwardAuth.Enabled && !this.auth.validateForwardAuthUser(req)) { - Logger.error(`[MiscController] Authorize token with forward auth enabled failed for user "${req.user.username}"`) - return res.sendStatus(403) + Logger.warn(`[MiscController] Authorize token with forward auth enabled failed for user "${req.user.username}"`) } const userResponse = this.auth.getUserLoginResponsePayload(req.user, this.rssFeedManager.feedsArray)