Skip to content

Commit

Permalink
#707 | Revert change to Name Invalid Values pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
himeshr committed Aug 14, 2024
1 parent 84ec00b commit bba5925
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public class UserController {
private final SubjectTypeRepository subjectTypeRepository;
private final AccessControlService accessControlService;

private final Pattern NAME_INVALID_CHARS_PATTERN = Pattern.compile("^.*[<>=\"].*$");

@Autowired
public UserController(CatchmentRepository catchmentRepository,
UserRepository userRepository,
Expand Down Expand Up @@ -181,7 +183,7 @@ private Boolean isUserNameInvalid(String userName) {
}

private Boolean isNameInvalid(String name) {
return ValidationUtil.checkNullOrEmptyOrContainsDisallowedCharacters(name, ValidationUtil.COMMON_INVALID_CHARS_PATTERN);
return ValidationUtil.checkNullOrEmptyOrContainsDisallowedCharacters(name, NAME_INVALID_CHARS_PATTERN);
}

private User setUserAttributes(User user, UserContract userContract, String userRegion) {
Expand Down

0 comments on commit bba5925

Please sign in to comment.