mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 22:02:13 +09:00
Fix RVE-2023-6 (validate module_srl when uploading/deleting)
This commit is contained in:
parent
e7eadcc6f1
commit
bffa50dd15
3 changed files with 28 additions and 16 deletions
|
|
@ -255,8 +255,7 @@ class EditorModel extends Editor
|
|||
$upload_status = FileModel::getUploadStatus();
|
||||
Context::set('upload_status', $upload_status);
|
||||
// Upload enabled (internally caching)
|
||||
$oFileController = getController('file');
|
||||
$oFileController->setUploadInfo($option->editor_sequence, $upload_target_srl);
|
||||
FileController::setUploadInfo($option->editor_sequence, $upload_target_srl, $option->module_srl ?? 0);
|
||||
// Check if the file already exists
|
||||
if($upload_target_srl) $files_count = FileModel::getFilesCount($upload_target_srl);
|
||||
}
|
||||
|
|
@ -294,6 +293,7 @@ class EditorModel extends Editor
|
|||
// Initialize options
|
||||
$option = new stdClass();
|
||||
$option->module_type = $type;
|
||||
$option->module_srl = (int)$module_srl;
|
||||
|
||||
// Convert configuration keys according to type (document or comment).
|
||||
if($type == 'document')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue