summaryrefslogtreecommitdiff
path: root/app/Controller/Base.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controller/Base.php')
-rw-r--r--app/Controller/Base.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/Controller/Base.php b/app/Controller/Base.php
index fcd07b99..19bb9ac9 100644
--- a/app/Controller/Base.php
+++ b/app/Controller/Base.php
@@ -211,6 +211,18 @@ abstract class Base extends \Core\Base
}
/**
+ * Check webhook token
+ *
+ * @access protected
+ */
+ protected function checkWebhookToken()
+ {
+ if ($this->config->get('webhook_token') !== $this->request->getStringParam('token')) {
+ $this->response->text('Not Authorized', 401);
+ }
+ }
+
+ /**
* Redirection when there is no project in the database
*
* @access protected