인증메일의 유효기간을 24시간으로 제한#1373
Merged
2 commits merged intoJul 6, 2015
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.
ID/PW찾기를 클릭했다가 비번이 기억나서 그냥 로그인하거나, 비슷한 메일주소를 가진 사람이 있는 경우 그 사람이 내 계정으로 ID/PW찾기를 시도하는 경우가 가끔 있죠. 타인의 계정을 탈취할 생각으로 일부러 계정찾기를 해보는 경우도 있겠고요.
이런 경우 대부분 인증메일을 무시하면 그만입니다. 그러나 XE는 인증메일에 유효기간이 없더군요. 제가 테스트해 보니 심지어 3년 전에 생성된 인증메일을 갖고도 비번 리셋이 가능합니다. 이건 보안상 좋지 않다고 생각됩니다.
그래서 인증메일을 통해 발송되는 인증키(auth_key)의 유효기간을 24시간으로 제한하고, 성공적으로 로그인할 경우 이전에 발급했던 인증키를 모두 삭제하는 기능을 넣어 보았습니다. 인증키의 유효기간이 지난 경우에는 ID/PW찾기 페이지로 들어가서 다시 발급받으면 됩니다.
가입인증의 경우에도 유효기간이 동일하게 24시간으로 적용되나, 유효기간이 지난 후에도 인증메일 재발송을 하면 다시 24시간 연장할 수 있습니다. 물론 인증을 완료하고 성공적으로 로그인하면 기존의 인증키는 삭제되어 더이상 사용하거나 연장할 수 없게 됩니다.