diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/webhooks/lib/Db/WebhookListener.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/webhooks/lib/Db/WebhookListener.php b/apps/webhooks/lib/Db/WebhookListener.php index a949d93c9ea..4781454fc1a 100644 --- a/apps/webhooks/lib/Db/WebhookListener.php +++ b/apps/webhooks/lib/Db/WebhookListener.php @@ -78,6 +78,9 @@ class WebhookListener extends Entity implements \JsonSerializable { public function setAuthDataClear(?array $data): void { if ($data === null) { + if ($this->getAuthMethodEnum() === AuthMethod::Header) { + throw new \UnexpectedValueException('Header auth method needs an associative array of headers as auth data'); + } $this->setAuthData(null); return; } |