Skip to content

Commit

Permalink
fixed code security
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladik-gif committed Nov 15, 2024
1 parent bd87cda commit a102a12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import lombok.Builder;

import static com.example.backend.utils.general.Constants.EMPTY_FIELD;
import static com.example.backend.utils.general.Constants.PASSWORD_FORMAT_MESSAGE;
import static com.example.backend.utils.general.Constants.FORMAT_MESSAGE;

@Builder
public record PasswordRequest(
@NotNull @NotBlank(message = EMPTY_FIELD)
@Size(min = 7, max = 20)
@Pattern(regexp = "^(?=.*\\d)[A-Za-z\\d]+$", message = PASSWORD_FORMAT_MESSAGE) String password) { }
@Pattern(regexp = "^(?=.*\\d)[A-Za-z\\d]+$", message = FORMAT_MESSAGE) String password) { }
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@Component
public class MyUserDetailsFactory implements Function<UserSecurityDTO, MyUserDetails> {
@Override
public MyUserDetails apply(UserSecurityDTO user) {
public MyUserDetails apply(final UserSecurityDTO user) {
return MyUserDetails.builder()
.user(UserSecurityDTO.builder()
.lastname(user.lastname())
Expand Down

0 comments on commit a102a12

Please sign in to comment.