Skip to content

Commit

Permalink
Merge pull request GEOLYTIX#1119 from dbauszus-glx/null-password
Browse files Browse the repository at this point in the history
Err on null password login
  • Loading branch information
dbauszus-glx authored Feb 8, 2024
2 parents e53c450 + 8c74d5d commit 2cf1041
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mod/user/fromACL.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ module.exports = async (req) => {

const user = await getUser(request)

if (user === undefined) {

// This will happen when a user has a null password.
return new Error('auth_failed')
}

if (user instanceof Error) {

return await failedLogin(request)
Expand Down Expand Up @@ -80,6 +86,8 @@ async function getUser(request) {

if (!user) return new Error('auth_failed')

if (!user.password) return;

// Blocked user cannot login.
if (user.blocked) {
return new Error(await languageTemplates({
Expand Down

0 comments on commit 2cf1041

Please sign in to comment.