보안취약점을 위해서 onclick등의 event를 _on동작으로 바꾼 것 때문에 동작하지 않던 새창 띄우기에 대해서만 원래데로 돌려 놓는 코드 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4672 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-10-22 04:27:01 +00:00
parent f2552a7a8e
commit f2fb4f5803

View file

@ -251,6 +251,9 @@
$_SESSION['accessible'][$this->document_srl] = true;
$content = $this->get('content');
// CSRF등의 보안 취약점 문제를 막기위한 코드로 인하여 새창 띄우기 코드가 무효화 된것을 원상태로 변경
$content = str_replace('_onclick="window.open(this.href);return false;"','onclick="window.open(this.href);return false;"',$content);
// rewrite모듈을 사용하면 링크 재정의
$oContext = &Context::getInstance();
@ -258,9 +261,6 @@
$content = preg_replace('/<a([ \t]+)href=("|\')\.\/\?/i',"<a href=\\2". Context::getRequestUri() ."?", $content);
}
// url에 대해서 정규표현식으로 치환
//$content = preg_replace('!([^>^"^\'^=])(http|https|ftp|mms):\/\/([^ ^<^"^\']*)!is','$1<a href="$2://$3" onclick="window.open(this.href);return false;">$2://$3</a>',' '.$content);
// 이 게시글을... 팝업메뉴를 출력할 경우
if($add_popup_menu) {
$content = sprintf(