[Fix] 리다이렉트 caution 오탐 수정 - #41
Merged
Merged
Conversation
Contributor
Author
|
P.S 네이버만 하드코딩한 처리는 아닙니다. 현재 로직은 모든 도메인에 공통으로 적용됩니다. 기준은 “같은 등록 도메인인지”입니다. 예를 들면: https://link.naver.com/bridge?url=https://m.naver.com/shorts/... 는 현재 도메인도 naver.com, 파라미터 목적지도 naver.com이라서 OPEN_REDIRECT_PARAM을 붙이지 않습니다. 같은 원리로 이런 케이스도 예외 처리됩니다. https://example.com/go?url=https://m.example.com/page 둘 다 등록 도메인이 각각 example.com, google.com으로 같기 때문입니다. 반대로 외부 도메인으로 보내면 여전히 잡힙니다. https://link.naver.com/bridge?url=https://evil.test/ 이 경우 목적지 등록 도메인이 다르므로 OPEN_REDIRECT_PARAM이 붙습니다. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
정상 네이버 릴스 공유 링크가
caution으로 오탐되는 문제를 수정했습니다.기존에는
link.naver.com/bridge?url=https://m.naver.com/shorts/...처럼 같은 등록 도메인 내부로 이동하는 URL도url파라미터가 있다는 이유만으로OPEN_REDIRECT_PARAM신호가 붙었습니다.이제 redirect 계열 파라미터의 목적지 등록 도메인이 현재 등록 도메인과 같으면 오픈 리다이렉트 신호를 붙이지 않습니다. 외부 도메인으로 이동하는 경우는 기존처럼
OPEN_REDIRECT_PARAM으로 탐지합니다.검증 결과
https://naver.me/5UV6uvn2는 다음처럼 변경되었습니다.연관 이슈 및 Close 할 이슈
close #40
Pull Request 체크리스트
TODO