Avoid password leakage
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 2m54s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 26s

The password should never be parsed to json ever so can be safely
ignored.
This commit is contained in:
Debucquoy Anthony 2024-04-07 14:46:14 +02:00
parent 9e0db361b8
commit 6299a6d79e
Signed by: tonitch
GPG Key ID: A78D6421F083D42E

View File

@ -3,6 +3,8 @@ package ovh.herisson.Clyde.Tables;
import jakarta.persistence.*; import jakarta.persistence.*;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonIgnore;
@Entity @Entity
@Table(name = "Users") @Table(name = "Users")
@ -18,7 +20,8 @@ public class User {
private String country; private String country;
private Date birthDate; private Date birthDate;
private String profilePictureUrl; private String profilePictureUrl;
private ovh.herisson.Clyde.Tables.Role role; private Role role;
@JsonIgnore
private String password; private String password;
public User(String lastName, String firstName, String email, String address, public User(String lastName, String firstName, String email, String address,
String country, Date birthDate, String profilePictureUrl, Role role, String password) String country, Date birthDate, String profilePictureUrl, Role role, String password)