* Fix error.

This commit is contained in:
liyuchun
2022-01-14 10:47:41 +08:00
parent f8f71f59af
commit 48bdba2a96
2 changed files with 5 additions and 5 deletions

View File

@@ -76,7 +76,7 @@ class pipelineModel extends model
->add('private',md5(rand(10,113450)))
->add('createdBy', $this->app->user->account)
->add('createdDate', helper::now())
->trim('token')
->trim('url,token,account,password')
->skipSpecial('url,token,account,password')
->get();
if($type == 'gitlab') $pipeline->url = rtrim($pipeline->url, '/');
@@ -105,7 +105,7 @@ class pipelineModel extends model
$pipeline = fixer::input('post')
->add('editedBy', $this->app->user->account)
->add('editedDate', helper::now())
->trim('token')
->trim('url,token,account,password')
->skipSpecial('url,token,account,password')
->get();
@@ -127,9 +127,9 @@ class pipelineModel extends model
* Delete one record.
*
* @param string $id the id to be deleted
* @param string $object the action object
* @param string $object the action object
* @access public
* @return int
* @return int
*/
public function delete($id, $object = 'gitlab')
{

View File

@@ -100,7 +100,7 @@ class sonarqube extends control
*/
protected function checkToken($sonarqubeID = 0)
{
$sonarqube = fixer::input('post')->get();
$sonarqube = fixer::input('post')->trim('url,token,account,password')->get();
$this->dao->update('sonarqube')->data($sonarqube)->batchCheck(empty($sonarqubeID) ? $this->config->sonarqube->create->requiredFields : $this->config->sonarqube->edit->requiredFields, 'notempty');
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
if(strpos($sonarqube->url, 'http') !== 0) return $this->send(array('result' => 'fail', 'message' => array('url' => array($this->lang->sonarqube->hostError))));