Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion k8s/helm-value.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
image:
tag: v0.1.9
tag: v0.1.10
env:
JWT_ACCESS_TOKEN_EXPIRATION: "1800000"
JWT_REFRESH_TOKEN_EXPIRATION: "1209600000"
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public enum MemberErrorCode implements ErrorCodeInterface {
EMAIL_SEND_FAILED("MEM010", "이메일 발송에 실패했습니다.", HttpStatus.INTERNAL_SERVER_ERROR),
INVALID_VERIFICATION_CODE("MEM011", "유효하지 않은 인증코드입니다.", HttpStatus.BAD_REQUEST),
VERIFICATION_CODE_EXPIRED("MEM012", "인증코드가 만료되었습니다.", HttpStatus.BAD_REQUEST),
EMAIL_NOT_VERIFIED("MEM013", "이메일 인증이 완료되지 않았습니다.", HttpStatus.BAD_REQUEST);
EMAIL_NOT_VERIFIED("MEM013", "이메일 인증이 완료되지 않았습니다.", HttpStatus.BAD_REQUEST),
SAME_AS_CURRENT_PASSWORD( "MEM014", "기존 비밀번호와 동일한 비밀번호는 사용할 수 없습니다.", HttpStatus.BAD_REQUEST);

private final String status;
private final String message;
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/earseo/member/service/AuthService.java
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,10 @@ public void resetPassword(PasswordResetRequestDto request) {
Member member = memberRepository.findByEmailAndProvider(request.email(), Provider.LOCAL)
.orElseThrow(() -> new BaseException(MemberErrorCode.MEMBER_NOT_FOUND));

if (passwordEncoder.matches(request.newPassword(), member.getPassword())) {
throw new BaseException(MemberErrorCode.SAME_AS_CURRENT_PASSWORD);
}

member.updatePassword(passwordEncoder.encode(request.newPassword()));
memberRepository.save(member);

Expand Down
Loading