From 07d77c039685483dd892ce9c5bb9d56fc6d199e2 Mon Sep 17 00:00:00 2001 From: George MacRorie Date: Fri, 24 May 2024 15:15:38 +0100 Subject: [PATCH] fix(config): validate non zero poll duration for authz sources Signed-off-by: George MacRorie --- internal/config/authorization.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/config/authorization.go b/internal/config/authorization.go index 49e542e4ad..99895b215a 100644 --- a/internal/config/authorization.go +++ b/internal/config/authorization.go @@ -85,6 +85,10 @@ func (a *AuthorizationSourceConfig) validate() (err error) { return errors.New("local: path must be non-empty string") } + if a.PollDuration <= 0 { + return errors.New("local: poll_duration must be non-zero") + } + return nil }