mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
fanbinit 12-24
This commit is contained in:
parent
881b0fbac1
commit
158609ddce
2 changed files with 8 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ class BoardView extends Board
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$oSecurity = new Security();
|
$oSecurity = new Security();
|
||||||
$oSecurity->encodeHTML('document_srl', 'comment_srl', 'vid', 'mid', 'page', 'category', 'search_target', 'search_keyword', 'sort_index', 'order_type', 'trackback_srl');
|
$oSecurity->encodeHTML('document_srl', 'comment_srl', 'vid', 'mid', 'page', 'category', 'search_target', 'search_keyword', 'sort_index', 'order_type', 'trackback_srl', 'v_mode');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setup the module general information
|
* setup the module general information
|
||||||
|
|
|
||||||
|
|
@ -1048,13 +1048,18 @@ class FileController extends File
|
||||||
if(!$uploaded_filename)
|
if(!$uploaded_filename)
|
||||||
{
|
{
|
||||||
$extension = ($direct && $file_info['extension']) ? ('.' . $file_info['extension']) : '';
|
$extension = ($direct && $file_info['extension']) ? ('.' . $file_info['extension']) : '';
|
||||||
$uploaded_filename = $storage_path . Rhymix\Framework\Security::getRandom(32, 'hex') . $extension;
|
$random_filename = Rhymix\Framework\Security::getRandom(32, 'hex');
|
||||||
|
$uploaded_filename = $storage_path . $random_filename . $extension;
|
||||||
while(file_exists($uploaded_filename))
|
while(file_exists($uploaded_filename))
|
||||||
{
|
{
|
||||||
$uploaded_filename = $storage_path . Rhymix\Framework\Security::getRandom(32, 'hex') . $extension;
|
$random_filename = Rhymix\Framework\Security::getRandom(32, 'hex');
|
||||||
|
$uploaded_filename = $storage_path . $random_filename . $extension;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fanbinit edit: remove original filename info
|
||||||
|
$args->source_filename = $random_filename . '.' . $file_info['extension'];
|
||||||
|
|
||||||
// Move the uploaded file
|
// Move the uploaded file
|
||||||
if(!Rhymix\Framework\Storage::moveUploadedFile($file_info['tmp_name'], $uploaded_filename, $move_type))
|
if(!Rhymix\Framework\Storage::moveUploadedFile($file_info['tmp_name'], $uploaded_filename, $move_type))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue