This commit is contained in:
dingguodong
2021-06-25 15:08:55 +08:00
2 changed files with 13 additions and 0 deletions
+1
View File
@@ -207,6 +207,7 @@ class gitlab extends control
*/
public function webhook()
{
$this->gitlab->webhookCheckToken();
$product = $this->get->product;
$gitlab = $this->get->gitlab;
$project = $this->get->project;
+12
View File
@@ -728,6 +728,18 @@ class gitlabModel extends model
return $response;
}
/**
* webhook check token.
*
* @access public
* @return void
*/
public function webhookCheckToken()
{
$gitlab = $this->getByID($this->get->gitlab);
if($gitlab->private != $this->get->token) die();
}
/**
* Parse webhook body function.
*