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 : referer 관련 헤더 추가 #80

Merged
merged 1 commit into from
Jan 10, 2023
Merged

Conversation

ImNM
Copy link
Member

@ImNM ImNM commented Jan 10, 2023

개요

  • close #issueNumber

작업사항

  • 내용을 적어주세요.

변경로직

  • 내용을 적어주세요.

@ImNM ImNM added the For: Deploy [이슈대상] 배포에 관한 이슈 label Jan 10, 2023
@ImNM ImNM self-assigned this Jan 10, 2023
@ImNM ImNM merged commit 7d46fd1 into dev Jan 10, 2023
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 10, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 120 Code Smells

9.8% 9.8% Coverage
0.0% 0.0% Duplication

String queryString =
String.format(
"?idToken=%s&accessToken=%s&refreshToken=%s",
credentialFromKaKao.getIdToken(),
credentialFromKaKao.getAccessToken(),
credentialFromKaKao.getRefreshToken());
response.sendRedirect("http://" + host + "/kakao/callback" + queryString);
if (referer != null) {
response.sendRedirect(referer + "/kakao/callback" + queryString);

Check failure

Code scanning / SonarCloud

HTTP request redirections should not be open to forging attacks

<!--SONAR_ISSUE_KEY:AYWcYMnDRG-4eVcWa89--->Change this code to not perform redirects based on user-controlled data. <p>See more on <a href="https://sonarcloud.io/project/issues?id=Gosrock_DuDoong-Backend&issues=AYWcYMnDRG-4eVcWa89-&open=AYWcYMnDRG-4eVcWa89-&pullRequest=80">SonarCloud</a></p>
if (referer != null) {
response.sendRedirect(referer + "/kakao/callback" + queryString);
} else {
response.sendRedirect("https://" + host + "/kakao/callback" + queryString);

Check failure

Code scanning / SonarCloud

HTTP request redirections should not be open to forging attacks

<!--SONAR_ISSUE_KEY:AYWcYMnDRG-4eVcWa899-->Change this code to not perform redirects based on user-controlled data. <p>See more on <a href="https://sonarcloud.io/project/issues?id=Gosrock_DuDoong-Backend&issues=AYWcYMnDRG-4eVcWa899&open=AYWcYMnDRG-4eVcWa899&pullRequest=80">SonarCloud</a></p>
@ImNM ImNM deleted the refactor/77-oauth-code-redirection branch January 11, 2023 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For: Deploy [이슈대상] 배포에 관한 이슈
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant