mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
관리자 세션을 악용할 수 있는 img, embed, input등의 src 값 변조 시도를 사전 제거하는 코드 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4354 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
de22070cee
commit
a557a12e42
3 changed files with 44 additions and 20 deletions
|
|
@ -1022,17 +1022,10 @@
|
|||
/**
|
||||
* @brief 내용의 에디터 컴포넌트 코드를 변환
|
||||
**/
|
||||
function _fixQuotation($matches) {
|
||||
$key = $matches[1];
|
||||
$val = $matches[2];
|
||||
if(substr($val,0,1)!='"') $val = '"'.$val.'"';
|
||||
return sprintf('%s=%s', $key, $val);
|
||||
}
|
||||
|
||||
function transEditorComponent($matches) {
|
||||
// IE에서는 태그의 특성중에서 " 를 빼어 버리는 경우가 있기에 정규표현식으로 추가해줌
|
||||
$buff = $matches[0];
|
||||
$buff = preg_replace_callback('/([^=^"^ ]*)=([^ ^>]*)/i', array($this, _fixQuotation), $buff);
|
||||
$buff = preg_replace_callback('/([^=^"^ ]*)=([^ ^>]*)/i', fixQuotation, $buff);
|
||||
$buff = str_replace("&","&",$buff);
|
||||
|
||||
// 에디터 컴포넌트에서 생성된 코드
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue