* Fix for sql injection attack.

This commit is contained in:
Yagami
2020-02-24 14:09:11 +08:00
parent 310c31b8ec
commit 7b2949916b
5 changed files with 11 additions and 6 deletions
+1
View File
@@ -181,6 +181,7 @@ class bugModel extends model
{
$this->loadModel('action');
$branch = (int)$branch;
$productID = (int)$productID;
$now = helper::now();
$actions = array();
$data = fixer::input('post')->get();
+1
View File
@@ -579,6 +579,7 @@ class caselibModel extends model
$this->loadModel('action');
$now = helper::now();
$libID = (int)$libID;
$cases = fixer::input('post')->get();
$batchNum = count(reset($cases));
+5 -4
View File
@@ -263,10 +263,11 @@ class storyModel extends model
public function batchCreate($productID = 0, $branch = 0)
{
$this->loadModel('action');
$branch = (int)$branch;
$now = helper::now();
$mails = array();
$stories = fixer::input('post')->get();
$branch = (int)$branch;
$productID = (int)$productID;
$now = helper::now();
$mails = array();
$stories = fixer::input('post')->get();
$result = $this->loadModel('common')->removeDuplicate('story', $stories, "product={$productID}");
$stories = $result['data'];
+3 -2
View File
@@ -27,11 +27,12 @@ class taskModel extends model
dao::$errors[] = $this->lang->task->error->recordMinus;
return false;
}
$projectID = (int)$projectID;
$taskIdList = array();
$taskFiles = array();
$this->loadModel('file');
$task = fixer::input('post')
->setDefault('project', (int)$projectID)
->setDefault('project', $projectID)
->setDefault('estimate,left,story', 0)
->setDefault('status', 'wait')
->setIF($this->post->estimate != false, 'left', $this->post->estimate)
@@ -65,7 +66,7 @@ class taskModel extends model
/* Check duplicate task. */
if($task->type != 'affair')
{
$result = $this->loadModel('common')->removeDuplicate('task', $task, "project=$projectID and story=" . (int)$task->story);
$result = $this->loadModel('common')->removeDuplicate('task', $task, "project={$projectID} and story=" . (int)$task->story);
if($result['stop'])
{
$taskIdList[$assignedTo] = array('status' => 'exists', 'id' => $result['duplicate']);
+1
View File
@@ -242,6 +242,7 @@ class testcaseModel extends model
function batchCreate($productID, $branch, $storyID)
{
$branch = (int)$branch;
$productID = (int)$productID;
$now = helper::now();
$cases = fixer::input('post')->get();