From bac73556c98fb94d5c790c211b7e535f878ca85a Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 18 Feb 2026 05:03:24 +0000 Subject: Fix unbounded memory usage in crawler (DoS) Co-authored-by: adammathes <868470+adammathes@users.noreply.github.com> --- internal/crawler/security_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'internal') diff --git a/internal/crawler/security_test.go b/internal/crawler/security_test.go index 198f7ee..f4d7b67 100644 --- a/internal/crawler/security_test.go +++ b/internal/crawler/security_test.go @@ -9,11 +9,12 @@ import ( "adammathes.com/neko/internal/safehttp" ) -func init() { +func TestGetFeedContentLimit(t *testing.T) { + // Enable local connections for this test + originalAllowLocal := safehttp.AllowLocal safehttp.AllowLocal = true -} + defer func() { safehttp.AllowLocal = originalAllowLocal }() -func TestGetFeedContentLimit(t *testing.T) { // 10MB limit expected limit := 10 * 1024 * 1024 // 11MB payload -- cgit v1.2.3