From 86e1e934bfe34735a11e441fabeab6051cf8461e Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 19 Aug 2021 11:08:21 +0200 Subject: [PATCH] webhooks: panic on nested webhook auth case This is not strictly speaking necessary since we have a panic which immediately follows the switch, but it is cleaner. --- webhooks/config.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webhooks/config.go b/webhooks/config.go index d35f07e09904414d354bfcd1f4cf2ac576ba261a..a381eb4cad356eebeb2f6776956a696f1edcc69d 100644 --- a/webhooks/config.go +++ b/webhooks/config.go @@ -41,6 +41,8 @@ func NewAuthConfig(ctx context.Context) (AuthConfig, error) { case auth.AUTH_INTERNAL: // TODO: Should this work? panic("Internal webtoken auth is not supported") + case auth.AUTH_WEBHOOK: + panic("Recursive webhook auth is not supported") } panic("Unreachable") }