Skip to content
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

Merged
merged 5 commits into from
Dec 8, 2024

Conversation

rlajm1203
Copy link
Contributor

📌 관련 이슈

#180

✒️ 작업 내용

  • FE로부터 Slack Oauth의 Redirect URI를 넘겨받을 때 uri에 불필요한 문자가 있는지 없는지 확인하여 검증하는 로직을 추가했습니다.

스크린샷 🏞️ (선택)

💬 REVIEWER에게 요구사항 💬

@rlajm1203 rlajm1203 added the bug Something isn't working label Dec 8, 2024
@rlajm1203 rlajm1203 requested review from Daae-Kim and kssumin December 8, 2024 13:57
@rlajm1203 rlajm1203 self-assigned this Dec 8, 2024
Copy link

github-actions bot commented Dec 8, 2024

Unit Test Results

77 tests  ±0   76 ✔️ ±0   2s ⏱️ -1s
30 suites ±0     1 💤 ±0 
30 files   ±0     0 ±0 

Results for commit ed3d07f. ± Comparison against base commit 0dc45fb.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@kssumin kssumin left a 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) {
Copy link
Contributor

@kssumin kssumin Dec 8, 2024

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() : 문자열의 앞뒤 공백 제거(우리 지금 문제 원인)
  • 정규표현식 : 줄바꿈, 탭, 스페이스 제거

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 어떻게 쓸지 고민했는데 저렇게 쓰면 되겠네요~ 감사합니다~

@rlajm1203 rlajm1203 merged commit c3dbb62 into develop Dec 8, 2024
2 checks passed
@rlajm1203 rlajm1203 deleted the BM/fix/180/redirect-uri branch December 8, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants