-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] FE로부터 넘어오는 redirect URI 를 검증힙니다. #187
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아.. 지금 로그인 안 되는 거 이 문제였군요.. 감사합니다..
제가 한다고 생각만 하고 안 했습니다..
@@ -27,4 +29,10 @@ public TokenModel login(String loginId, String password) { | |||
OAuthMemberEntity entity = authService.authenticate(loginId, password); | |||
return authenticationTokenGenerator.execute(entity.getMemberId()); | |||
} | |||
|
|||
private String validate(String uri) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return uri.trim()
.replaceAll("[\n\r\t ]", "");
trim, 정규표현식을 사용해서 이렇게 표현해도 좋을 것 같아요~
- trim() : 문자열의 앞뒤 공백 제거(우리 지금 문제 원인)
- 정규표현식 : 줄바꿈, 탭, 스페이스 제거
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 어떻게 쓸지 고민했는데 저렇게 쓰면 되겠네요~ 감사합니다~
📌 관련 이슈
#180
✒️ 작업 내용
스크린샷 🏞️ (선택)
💬 REVIEWER에게 요구사항 💬