-
Notifications
You must be signed in to change notification settings - Fork 62
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 for Not-Alphabet URL document writing (#634) #1120
Merged
Merged
Conversation
This file contains 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
#634 # Internet Explorer send punycode URL(ASCII) URL and non-alphabet Unicode URL URL as a referer. 인터넷 익스플로러는 리퍼러 주소로 퓨니코드 주소와 유니코드 URL을 섞어 쓰고 있습니다. AJAX 통신에는 리퍼러로 Unicode를 사용하고 요청 호스트로는 퓨니코드 URL을 사용(이건 다국어 주소 형식으로 접속하려면 이렇게 했어야 할 것)합니다. - XE strictly compare referer and server host for denying CSRF, but punycode URL and Unicode URL should be dealt as a same one. 그런데 XE는 리퍼러의 호스트와 서버 호스트를 비교합니다. punycode로 쓰인 주소와 Unicode로 쓰인 주소는 같은 주소를 지시하더라도 문자열이 다릅니다. 같은 주소를 지칭하는 다른 문자열을 punycode로 변환해서 같은 주소라고 인식할 수 있게 수정했습니다. - Fix checkCSRF function to deal both form as a same one. - Convert Unicode URL input to punycode URL on the Admin Default URL Settings. 관리자가 유니코드 형식으로 기본 주소를 입력하더라도, 퓨니코드로 변환해 저장하도록 했습니다. 퓨니코드로 저장하는 것이 여러모로 유용하기 때문입니다. - For converting punycode URL, include IDNA coverting class. 퓨니코드와 유니코드 간 변환을 위해서 IDNA 변환 클래스(LGPL사용권)를 포함시켰습니다.
乃 |
1 similar comment
乃 |
👍 |
@@ -1517,7 +1517,17 @@ function checkCSRF() | |||
} | |||
|
|||
$defaultUrl = Context::getDefaultUrl(); | |||
$referer = parse_url($_SERVER["HTTP_REFERER"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$referer = NULL;
변수 초기화 필요~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기존에 있던 코드인데, 초키화도 넣어서 다시 PR 넣는게 좋을까요?
알이즈웰 |
@bnu 문제 있으면 알려주세요! |
:) |
ghost
pushed a commit
that referenced
this pull request
Mar 3, 2015
fix for Not-Alphabet URL document writing (#634)
This pull request was closed.
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.
#634
Internet Explorer send punycode URL(ASCII) URL and non-alphabet
Unicode URL URL as a referer. 인터넷 익스플로러는 리퍼러 주소로 퓨니코드 주소와 유니코드 URL을 섞어
쓰고 있습니다. AJAX 통신에는 리퍼러로 Unicode를 사용하고 요청 호스트로는 퓨니코드 URL을 사용(이건 다국어 주소
형식으로 접속하려면 이렇게 했어야 할 것)합니다.
punycode URL and Unicode URL should be dealt as a same one. 그런데 XE는 리퍼러의
호스트와 서버 호스트를 비교합니다. punycode로 쓰인 주소와 Unicode로 쓰인 주소는 같은 주소를 지시하더라도 문자열이
다릅니다. 같은 주소를 지칭하는 다른 문자열을 punycode로 변환해서 같은 주소라고 인식할 수 있게 수정했습니다.
Settings. 관리자가 유니코드 형식으로 기본 주소를 입력하더라도, 퓨니코드로 변환해 저장하도록 했습니다. 퓨니코드로 저장하는
것이 여러모로 유용하기 때문입니다.
간 변환을 위해서 IDNA 변환 클래스(LGPL사용권)를 포함시켰습니다.
이 수정을 하면 _한글 도메인에서 글 작성이 가능_합니다. 하지만, _파일 업로드의 경우는 SWF Uploader 이슈로 파일 업로드가 불가능_합니다. 이 문제는, HTML5를 지원하는 파일 업로더를 이용하면 해결됩니다. (워드 프레스 등의 해결법) HTML5를 지원하는 파일 업로더는 AXISJ 업로더 등을 포함해서 XE 공식 홈페이지 자료실에서 다운받아 사용할 수 있습니다.(에디터 변경)