Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

fix: Security Misconfiguration #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Backend/src/api/events/admin-accounts.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ export class AdminAccountsController implements interfaces.Controller {
if (!this.passWordHashingService.isPasswordHashed(passWord, result[0].passWord)) {
if (backendConfiguration.debug) {
return response.status(400).json({
error: `The password \"${passWord}\" with the hash
\"${passwordHash}\", does not match the hash \"${result[0].passWord}\" of the stored password!`
error: `The password is incorrect!`
});
} else {
return response.status(400).json({
Expand Down
4 changes: 1 addition & 3 deletions Backend/src/api/events/change-user-profile.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ export class ChangeUserProfileController implements interfaces.Controller {

if (!this.passWordHashingService.isPasswordHashed(request.body.oldPassword, userAccounts[0].passWord)) {
return response.status(400).json({
error: `The old password \"${request.body.oldPassword}\"
with the hash \"${hashedPassword}\"
and the hash \"${userAccounts[0].passWord}\" of the password found in the database do not match!`
error: `The password is incorrect!`
});
}

Expand Down
3 changes: 1 addition & 2 deletions Backend/src/api/events/user-accounts.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ export class UserAccountsController implements interfaces.Controller {
if (!this.passWordHashingService.isPasswordHashed(passWord, result[0].passWord)) {
if (backendConfiguration.debug) {
return response.status(400).json({
error: `The password \"${passWord}\" with the hash
\"${passwordHash}\", does not match the hash \"${result[0].passWord}\" of the stored password!`
error: `The password is incorrect!`
});
} else {
return response.status(400).json({
Expand Down