Skip to content

Commit

Permalink
fix: return 403 on authy endpoints when user disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
hello-woof authored Sep 12, 2024
1 parent f03ddaf commit ec1e4dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/prehandlers/disable-users.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const errorMessage = 'Access denied. You are not allowed create or sign in users
export default async function disableUserHandler(request, reply) {
const { url } = request;

if (adminSettings.get('disable_users') && (!authRegex.test(url) || !accountRegex.test(url))) {
if (adminSettings.get('disable_users') && (authRegex.test(url) || accountRegex.test(url))) {
return reply.code(403).send({ error: errorMessage });
}
}

0 comments on commit ec1e4dc

Please sign in to comment.