-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…rability 이메일 인증 우회 취약점 해결
- Loading branch information
Showing
34 changed files
with
716 additions
and
600 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 10 additions & 14 deletions
24
src/main/java/com/alzzaipo/common/email/domain/EmailVerificationCode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,23 @@ | ||
package com.alzzaipo.common.email.domain; | ||
|
||
import jakarta.validation.constraints.Pattern; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import org.hibernate.validator.constraints.Length; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
public class EmailVerificationCode { | ||
|
||
public static final int length = 8; | ||
public static final int length = 8; | ||
|
||
@Length(min = length, max = length) | ||
@Pattern(message = "이메일 형식 오류", regexp = "^[A-Za-z0-9]{8}$") | ||
private String emailVerificationCode; | ||
@Length(min = length, max = length) | ||
@Pattern(message = "이메일 형식 오류", regexp = "^[A-Za-z0-9]{8}$") | ||
private String emailVerificationCode; | ||
|
||
public EmailVerificationCode(String emailVerificationCode) { | ||
this.emailVerificationCode = emailVerificationCode; | ||
} | ||
public EmailVerificationCode(String emailVerificationCode) { | ||
this.emailVerificationCode = emailVerificationCode; | ||
} | ||
|
||
public String get() { | ||
return emailVerificationCode; | ||
} | ||
public String get() { | ||
return emailVerificationCode; | ||
} | ||
} |
22 changes: 0 additions & 22 deletions
22
src/main/java/com/alzzaipo/common/email/domain/EmailVerificationStatus.java
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
.../java/com/alzzaipo/common/email/port/out/verification/CheckEmailVerificationCodePort.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.alzzaipo.common.email.port.out.verification; | ||
|
||
import com.alzzaipo.common.email.domain.EmailVerificationPurpose; | ||
|
||
public interface CheckEmailVerificationCodePort { | ||
|
||
boolean check(String email, String verificationCode, EmailVerificationPurpose purpose); | ||
} |
8 changes: 0 additions & 8 deletions
8
src/main/java/com/alzzaipo/common/email/port/out/verification/CheckEmailVerifiedPort.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
...java/com/alzzaipo/common/email/port/out/verification/VerifyEmailVerificationCodePort.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...com/alzzaipo/member/adapter/in/web/dto/CheckLocalAccountEmailVerificationCodeRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.alzzaipo.member.adapter.in.web.dto; | ||
|
||
import jakarta.validation.constraints.Email; | ||
import jakarta.validation.constraints.NotBlank; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
public class CheckLocalAccountEmailVerificationCodeRequest { | ||
|
||
@NotBlank | ||
private String email; | ||
|
||
@NotBlank | ||
private String verificationCode; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...om/alzzaipo/member/application/port/in/account/local/CheckEmailVerificationCodeQuery.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.alzzaipo.member.application.port.in.account.local; | ||
|
||
import com.alzzaipo.member.application.port.in.dto.CheckLocalAccountEmailVerificationCodeCommand; | ||
|
||
public interface CheckEmailVerificationCodeQuery { | ||
|
||
boolean checkEmailVerificationCode(CheckLocalAccountEmailVerificationCodeCommand command); | ||
} |
Oops, something went wrong.