feat(auth): password change requires old password

By checking the "old" password of the user prior to a password change, the
password change function is more secured against abuse.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2021-12-28 01:46:40 +01:00
parent 149369d19a
commit eda6835403
No known key found for this signature in database
GPG key ID: DB99ADDDC5C0AF82
4 changed files with 37 additions and 2 deletions

View file

@ -114,6 +114,7 @@ describe('Register and Login', () => {
.set('Content-Type', 'application/json')
.send(
JSON.stringify({
currentPassword: PASSWORD,
newPassword: 'newPassword',
}),
)