From 583961bd3b13fe8c41c414f678f07198687ccb06 Mon Sep 17 00:00:00 2001 From: Bretton Date: Thu, 6 Nov 2025 17:17:55 -0800 Subject: [PATCH] refactor: add cursorSecret to community feed repository - Update NewCommunityFeedRepository to accept cursorSecret parameter - Enables HMAC-signed cursors for security - Consistent with timeline and discover feed repos - Prevents cursor tampering and pagination attacks --- cmd/server/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/server/main.go b/cmd/server/main.go index 5697ab2..509c67c 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -300,7 +300,7 @@ func main() { log.Println("✅ Comment service initialized (with author/community hydration)") // Initialize feed service - feedRepo := postgresRepo.NewCommunityFeedRepository(db) + feedRepo := postgresRepo.NewCommunityFeedRepository(db, cursorSecret) feedService := communityFeeds.NewCommunityFeedService(feedRepo, communityService) log.Println("✅ Feed service initialized") -- 2.51.2