Commit graph

696 commits

Author SHA1 Message Date
Kijin Sung
3484b2bb48 Fix 'security violation' error when no file is uploaded 2018-10-10 18:16:57 +09:00
Kijin Sung
c3f1e24b02 Ensure more consistent operation of security checks
- 수상한 파일이 업로드되었을 때 isSuccessInit = false로 지정
- isSuccessInit = false인 경우 무조건 에러메시지 출력 (xpressengine/xe-core#2304)
- 보안정책 관련 에러메시지는 msg_security_violation으로 통일
2018-10-10 16:27:23 +09:00
Kijin Sung
c54fa8dab1 Use escape more consistently
여기저기 htmlspecialchars가 들어 있는 것을 escape로 통일
2018-10-10 15:07:51 +09:00
Kijin Sung
19331e6746 Additional XSS checks #1088 2018-09-18 13:27:55 +09:00
Kijin Sung
60d390f52e Initial mitigations for #1088 #1089 2018-09-17 00:48:47 +09:00
Kijin Sung
a49f2f5f06 Change Context::isAlwaysSSL() to config('session.use_ssl_cookies')
- Main session cookie is httpOnly if use_ssl is true
- SSO cookie is always httpOnly
2018-08-06 01:23:22 +09:00
Kijin Sung
2c9bb88a14 Merge branch 'develop' into pr/1051 2018-08-06 01:08:51 +09:00
Kijin Sung
8db2ac16c7 Revert "basic files의 로드를 막을 수 있도록 Context::unloadBasicFiles() 추가"
This reverts commit 35b73eec0b.
2018-08-04 20:56:41 +09:00
Kijin Sung
867d6930cf Revert "35b73eec0b 보완"
This reverts commit 30e0a5c583.
2018-08-04 20:56:34 +09:00
Kijin Sung
f12cf74dda Revert "다른 프레임워크와 css 충돌을 피하기 위해 rhymix.less의 class/id 이름에 prefix 처리"
This reverts commit b1cb1f3f34.
2018-08-04 20:56:24 +09:00
conory
b1cb1f3f34 다른 프레임워크와 css 충돌을 피하기 위해 rhymix.less의 class/id 이름에 prefix 처리
변경전의 xe.less 파일도 rhymix.less와 함께 load 하여 호환정 유지

CSS 충돌 예)
bootstrap의 .btn
사용 예)
bootstrap 사용시엔 {Context::unloadBasicFiles('xe')}으로 unload 시키면 문제없음
2018-08-03 19:45:30 +09:00
conory
30e0a5c583 35b73eec0b 보완
파일이름으로 unload 할 수 없도록 변경 (호환성 파괴 위험성이 크므로)
2018-08-03 12:32:42 +09:00
Min-Soo Kim
25d2e4892a Revert "Example of the cookie option"
This reverts commit 93a35c251b.
2018-08-02 00:35:52 +09:00
Min-Soo Kim
93a35c251b Example of the cookie option 2018-08-02 00:35:27 +09:00
Min-Soo Kim
30fd0c428c Improve cookie security; Secure flag
SSL 항상 사용 옵션인 경우 쿠키도 이에 맞추어 SSL 인 경우에만 사용되도록 secure flag 를 추가합니다.
선택적 SSL 인 경우 SSL 이 적용되지 않은 구간에서도 쿠키를 읽을 수 있어야 하므로, 적용하지 않습니다.

이 PR 로 변경되는 내용

- Context 클래스에 checkSslEnforce 메소드 추가
- SSL 항상 사용 옵션일 경우, 가능한 secure 플래그를 달아서 쿠기 굽기
- SSO 쿠키의 경우 javascript 접근이 필요 없을 것으로 예상 ( https://github.com/rhymix/rhymix/pull/1034 ) 되어서 `httpOnly` 플래그도 추가.

안드로이드 웹뷰의 경우 StackOverFlow 의 Reading secure cookies in android WebView 라는 글을 참고하면, 읽어오는 것이 가능하다고 합니다. 주소에 프로토콜을 적지 않을 경우 secure flag 가 달린 쿠키는 정상적으로 읽어오지 않는 듯 하니 안드로이드 웹뷰를 사용하시는 분들은 대응이 필요할 것으로 보입니다.

https: //github.com/rhymix/rhymix/pull/1034 를 실수로 merge 하여서 다시 올립니다.
Co-Authored-By: Kijin Sung <kijin@kijinsung.com>
2018-07-29 12:15:24 +09:00
Min-Soo Kim
b62a1322c9 Revert "Merge branch 'develop' into develop"
This reverts commit ec54bbd415, reversing
changes made to 9b12e0a71c.
2018-07-29 11:54:14 +09:00
Min-Soo Kim
ec54bbd415
Merge branch 'develop' into develop 2018-07-29 11:49:27 +09:00
conory
35b73eec0b basic files의 로드를 막을 수 있도록 Context::unloadBasicFiles() 추가
예) Context::unloadBasicFiles('admin' , 'rhymix.less', ...);
2018-07-05 16:45:55 +09:00
Min-Soo Kim
f8edfacde2 Refine secure cookie flag
_use_ssl 대신 site_module_info 를 직접 참조하도록 수정.
함수 이름을 조금 더 자연스럽게 수정.
2018-04-28 11:25:15 +09:00
Min-Soo Kim
da95eed96e Fix typo; Context class
오타 수정. 문장 끝 세미콜론 추가
2018-04-24 20:20:50 +09:00
Min-Soo Kim
c1c9a94623 Improve cookie security; Secure flag
SSL 항상 사용 옵션인 경우 쿠키도 이에 맞추어 SSL 인 경우에만 사용되도록 `secure` flag 를 추가합니다.
선택적 SSL 인 경우 SSL 이 적용되지 않은 구간에서도 쿠키를 읽을 수 있어야 하므로, 적용하지 않습니다.
2018-04-24 19:30:38 +09:00
conory
5ebbbf5b36 파라미터 이름이 *srl일 경우 발생되는 호환 문제 수정
mid의 레이아웃(layout_srl) 설정을 '사이트 기본 레이아웃' (음수값 -1) 으로 할 수 없는 문제 수정
2018-04-23 01:05:28 +09:00
Kijin Sung
591e9cb270 Revert "Improve cookie secure setting values"
This reverts commit 73da2af393.
2018-04-23 00:43:24 +09:00
Kijin Sung
cfca05c897 Revert "Fix httpOnly flag by mistake.... (#1032)"
This reverts commit 0347bb7053.
2018-04-23 00:42:12 +09:00
Min-Soo Kim
0347bb7053
Fix httpOnly flag by mistake.... (#1032)
73da2af393 fix.
2018-04-23 00:17:26 +09:00
Min-Soo Kim
73da2af393 Improve cookie secure setting values
HTTPS 를 사용하는 상황에 대한 판단을 할 수 있는 상황에서 쿠키의 secure flag 를 달아준다.
2018-04-22 23:58:13 +09:00
conory
4ca57ae95a page, *_srl 파라미터의 값을 양의 정수로 고정
익명글을 쓴 회원을 찾을 수 있다던지 하는 의도하지 않은 문제 방지
2018-04-06 21:38:22 +09:00
conory
07dc7a2311 #1025 json request 호환 문제 수정
deprecated 이므로 내장함수 exec_json 사용 권장!
2018-04-06 12:09:01 +09:00
conory
c4b12c301c 결과 메세지가 출력되지 않는 문제 수정 2018-03-30 22:10:56 +09:00
conory
64b5299864 호환 문제 의심 수정 2018-03-27 15:40:05 +09:00
conory
e0edf3cb53 Context::setRequestArguments() 입력 정리 2018-03-26 23:55:07 +09:00
Kijin Sung
7eed765ec5 Fix #1014 #1015 XMLRPC 2018-03-14 10:40:49 +09:00
Kijin Sung
79120ae5b6 Return immediately if JSON 2018-03-13 11:08:53 +09:00
Kijin Sung
39dd27762e Clean up of request method and argument handling 2018-03-13 11:06:17 +09:00
conory
4520a6a2a4 canonical URL이 출력되지 않는 문제 수정 2018-03-12 21:50:52 +09:00
conory
cbd66462c7 4d0cfabfb7 exec_json() 요청시 POST로 처리되어 AJAX communication error가 발생되는 문제 수정 2018-03-11 01:23:56 +09:00
conory
720570224c 4d0cfabfb7 exec_xml() 오류로 일부 되돌림 2018-03-10 23:49:03 +09:00
conory
4d0cfabfb7 XMLRPC 요청을 무시하는 문제 수정 2018-03-10 23:34:37 +09:00
Kijin Sung
ed7ed13bb9 Remove and consolidate remainder of non-static methods in Context 2018-03-06 20:30:52 +09:00
Kijin Sung
a1848f5e89 Fix more unnecessary non-static method calls 2018-03-04 00:14:53 +09:00
Kijin Sung
61114c5198 Clean up Context::getInstance(), constructor, and oFrontEndFileHandler
대부분의 Context 함수가 static으로 바뀌었기 때문에 기존 자료 호환성을 제외하면
instance를 사용할 일은 이제 거의 없음. instance에는 최소한의 속성만 남기고
생성자(__construct)에 있던 기능도 모두 getInstance()로 옮김.
2018-03-03 12:30:22 +09:00
Kijin Sung
b2852e1936 Clean up SSL action cache file handling 2018-03-03 02:06:19 +09:00
Kijin Sung
9d06f6a9e2 Enable static calling of Context::init() and convert unnecessary instance properties into static properties 2018-03-03 01:44:05 +09:00
Kijin Sung
76aafac4a7 Set Context::$_tpl_vars to global $__Context__ 2018-03-02 21:17:52 +09:00
Kijin Sung
513f136c34 Isolate user-created template vars (Context::set) from Context instance properties 2018-03-02 21:02:59 +09:00
Kijin Sung
8ef0d05ecb Fix incorrect translation of use_object_cache setting to XE format 2018-01-13 20:15:48 +09:00
bnu
89e4936fb1 Context::convertEncoding() charset 목록 정리 2017-12-07 12:55:50 +09:00
Kijin Sung
e78189ea5c Fix invisible message content on mobile default skin
- 모바일에서 쪽지 본문이 보이지 않는 문제 수정
- 모바일 쪽지 기본 스킨에서 본문 아래에 목록을 표시하도록 수정
- 항상 Context::get('m') 변수를 사용할 수 있도록 수정
2017-12-03 22:23:48 +09:00
람츠
f4c19a3e0f $request_method 속성에 대한 주석변경
JSON 추가.
2017-11-28 19:41:52 +09:00
람츠
e2704f684a Update Context.class.php 2017-11-28 19:41:41 +09:00