Skip to content

Commit

Permalink
security: patch primsa expansion on token request
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycarambat committed Mar 29, 2024
1 parent 52fac84 commit 2374939
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/endpoints/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function systemEndpoints(app) {

if (await SystemSettings.isMultiUserMode()) {
const { username, password } = reqBody(request);
const existingUser = await User.get({ username });
const existingUser = await User.get({ username: String(username) });

if (!existingUser) {
await EventLogs.logEvent(
Expand All @@ -125,7 +125,7 @@ function systemEndpoints(app) {
return;
}

if (!bcrypt.compareSync(password, existingUser.password)) {
if (!bcrypt.compareSync(String(password), existingUser.password)) {
await EventLogs.logEvent(
"failed_login_invalid_password",
{
Expand Down

0 comments on commit 2374939

Please sign in to comment.