Skip to content

Commit 142e593

Browse files
committed
fix(account): sanitize password in checkPassword method to prevent injection
Signed-off-by: Manuel Abascal <[email protected]>
1 parent 5a12f03 commit 142e593

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

frontend/src/app/core/auth/account.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export class AccountService {
2525
}
2626

2727
checkPassword(password: string, uuid: string): Observable<HttpResponse<string>> {
28-
return this.http.get(SERVER_API_URL + `api/check-credentials?password=${password}&checkUUID=${uuid}`, {
28+
const sanitizedPassword = encodeURIComponent(password);
29+
return this.http.get(SERVER_API_URL + `api/check-credentials?password=${sanitizedPassword}&checkUUID=${uuid}`, {
2930
observe: 'response',
3031
responseType: 'text'
3132
});

0 commit comments

Comments
 (0)