IPv6 사용시 /48 이상 변경되면 세션을 유지하지 않도록 변경#1767
Merged
1 commit merged intoAug 30, 2016
Merged
Conversation
This pull request was closed.
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.
현재 XE는 모바일이 아닌 경우 IPv4 주소의 마지막 자리가 바뀌는 것까지는 봐주지만, 그 이상 변경되면 로그인이 풀리도록 되어 있습니다. 세션을 탈취하더라도 악용하지 못하도록 하는 기능과, 유동IP 사용자의 편의 사이에서 적절한 균형을 잡았다고 보여집니다.
그러나 IPv6 주소는
ip2long()함수에서false를 반환하므로false == false가 되어 항상 합격입니다. 즉, 완전히 엉뚱한 IP에서 접속하더라도 세션이 유지됩니다.이 패치는 IPv6 주소에도 IPv4와 비슷한 정책을 적용하여,
/48이상 변경되면 로그인이 풀리도록 합니다. 일반적인 가정이나 사무실에 배정되는 IPv6 대역이/48~/64사이이므로 이 정도면 적당하지 않을까 싶지만, 만약 그렇지 않다면 적용되는 범위는 얼마든지 조정할 수 있습니다.