Skip to content

Commit 2374939

Browse files
security: patch primsa expansion on token request
1 parent 52fac84 commit 2374939

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

server/endpoints/system.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function systemEndpoints(app) {
105105

106106
if (await SystemSettings.isMultiUserMode()) {
107107
const { username, password } = reqBody(request);
108-
const existingUser = await User.get({ username });
108+
const existingUser = await User.get({ username: String(username) });
109109

110110
if (!existingUser) {
111111
await EventLogs.logEvent(
@@ -125,7 +125,7 @@ function systemEndpoints(app) {
125125
return;
126126
}
127127

128-
if (!bcrypt.compareSync(password, existingUser.password)) {
128+
if (!bcrypt.compareSync(String(password), existingUser.password)) {
129129
await EventLogs.logEvent(
130130
"failed_login_invalid_password",
131131
{

0 commit comments

Comments
 (0)