Update Owner.java

Signed-off-by: AulaEmpresaLKS <129507941+AulaEmpresaLKS@users.noreply.github.com>
This commit is contained in:
AulaEmpresaLKS 2025-03-31 11:39:00 +02:00 committed by GitHub
parent 8eff6981f1
commit b807810178
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -170,6 +170,14 @@ public class Owner extends Person {
Assert.notNull(pet, "Invalid Pet identifier!");
pet.addVisit(visit);
(req: Request, res: Response, next: NextFunction) => {
verifyPreLoginChallenges(req) // vuln-code-snippet hide-line
models.sequelize.query('SELECT * FROM Users WHERE email = :email AND password = :password AND deletedAt IS NULL', {
replacements: { email: req.body.email || '', password: security.hash(req.body.password || '') },
model: UserModel,
plain: true
})
}
}