mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-22 11:52:14 +09:00
#64 서버 내 경로를 절대경로로 변경
This commit is contained in:
parent
bf0dd35f0a
commit
932862be1f
42 changed files with 807 additions and 133 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue