mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-30 00:29:58 +09:00
#18070021 * 외부페이지 링크 변조되는 문제 수정
* by 백성찬님 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6533 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
921fcd1190
commit
40660efbe0
1 changed files with 5 additions and 5 deletions
|
|
@ -43,7 +43,7 @@
|
||||||
// 결과 출력 템플릿 지정
|
// 결과 출력 템플릿 지정
|
||||||
$this->setTemplateFile('content');
|
$this->setTemplateFile('content');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 외부 http로 요청되는 파일일 경우 파일을 받아와서 저장 후 return
|
* @brief 외부 http로 요청되는 파일일 경우 파일을 받아와서 저장 후 return
|
||||||
**/
|
**/
|
||||||
|
|
@ -60,7 +60,7 @@
|
||||||
$content = FileHandler::readFile($cache_file);
|
$content = FileHandler::readFile($cache_file);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// opage controller 생성
|
// opage controller 생성
|
||||||
$oOpageController = &getController('opage');
|
$oOpageController = &getController('opage');
|
||||||
|
|
||||||
|
|
@ -92,7 +92,7 @@
|
||||||
**/
|
**/
|
||||||
function executeFile($path, $caching_interval, $cache_file) {
|
function executeFile($path, $caching_interval, $cache_file) {
|
||||||
// 파일이 없으면 취소
|
// 파일이 없으면 취소
|
||||||
if(!file_exists($path)) return;
|
if(!file_exists($path)) return;
|
||||||
|
|
||||||
// 경로와 파일이름을 구함
|
// 경로와 파일이름을 구함
|
||||||
$tmp_path = explode('/',$cache_file);
|
$tmp_path = explode('/',$cache_file);
|
||||||
|
|
@ -140,8 +140,8 @@
|
||||||
function _replacePath($matches) {
|
function _replacePath($matches) {
|
||||||
$val = trim($matches[3]);
|
$val = trim($matches[3]);
|
||||||
|
|
||||||
// http 또는 / 로 시작하는 경로라면 그냥 pass
|
// 외부링크 또는 / 로 시작하는 경로라면 그냥 pass
|
||||||
if(preg_match('/^(http|\/)/i',$val)) return $matches[0];
|
if(preg_match('/^(http|https|ftp|telnet|mms|\/)/i',$val)) return $matches[0];
|
||||||
|
|
||||||
// .. 와 같은 경우 대상 경로를 구함
|
// .. 와 같은 경우 대상 경로를 구함
|
||||||
elseif(preg_match('/^(\.\.)/i',$val)) {
|
elseif(preg_match('/^(\.\.)/i',$val)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue