#64 서버 내 경로를 절대경로로 변경

This commit is contained in:
bnu 2013-11-22 14:57:24 +09:00
parent bf0dd35f0a
commit 932862be1f
42 changed files with 807 additions and 133 deletions

View file

@ -17,8 +17,8 @@ class EmbedFilter
* @var int
*/
var $allowscriptaccessKey = 0;
var $whiteUrlXmlFile = './classes/security/conf/embedWhiteUrl.xml';
var $whiteUrlCacheFile = './files/cache/embedfilter/embedWhiteUrl.php';
var $whiteUrlXmlFile = _XE_PATH_ . 'classes/security/conf/embedWhiteUrl.xml';
var $whiteUrlCacheFile = _XE_PATH_ . 'files/cache/embedfilter/embedWhiteUrl.php';
var $whiteUrlList = array();
var $whiteIframeUrlList = array();
var $parser = NULL;

View file

@ -3,24 +3,23 @@
class UploadFileFilter
{
private static $_block_list = array ('exec', 'system', 'passthru', 'show_source', 'phpinfo', 'fopen', 'file_get_contents', 'file_put_contents', 'fwrite', 'proc_open', 'popen');
public function check($file)
{
// TODO: 기능개선후 enable
return TRUE; // disable
if (! $file || ! file_exists ( $file )) return TRUE;
if (! $file || ! FileHandler::exists($file)) return TRUE;
return self::_check ( $file );
}
private function _check($file)
{
if (! ($fp = fopen ( $file, 'r' ))) return FALSE;
$has_php_tag = FALSE;
while ( ! feof ( $fp ) )
{
$content = fread ( $fp, 8192 );
@ -34,9 +33,9 @@ class UploadFileFilter
}
}
}
fclose ( $fp );
return TRUE;
}
}