From 2e6bcec72ae8f8c3f8989260921dd177ea675701 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 5 Apr 2026 19:55:50 +0200 Subject: [PATCH] feat(caldav): reject basic auth for bot users --- pkg/routes/caldav/auth.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/routes/caldav/auth.go b/pkg/routes/caldav/auth.go index a2b617809..930b8f013 100644 --- a/pkg/routes/caldav/auth.go +++ b/pkg/routes/caldav/auth.go @@ -65,6 +65,10 @@ func BasicAuth(c *echo.Context, username, password string) (bool, error) { return false, nil } if u != nil { + if u.IsBot() { + log.Warningf("CalDAV auth rejected for bot user %d", u.ID) + return false, nil + } c.Set("userBasicAuth", u) return true, nil } @@ -103,6 +107,10 @@ func BasicAuth(c *echo.Context, username, password string) (bool, error) { } } if u != nil && err == nil { + if u.IsBot() { + log.Warningf("CalDAV basic auth rejected for bot user %d", u.ID) + return false, nil + } c.Set("userBasicAuth", u) return true, nil }