mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(webhooks): Refuse webhooks registration if auth header is used without auth data
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
621c068680
commit
74e5812c26
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue