From ad61c0f89e2fd5241576d1e6b8c6a9a71a295176 Mon Sep 17 00:00:00 2001 From: CaIon Date: Mon, 5 Jan 2026 18:55:24 +0800 Subject: [PATCH] fix(gin): update request body size check to allow zero limit --- common/gin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/gin.go b/common/gin.go index 5a066bc16..9acb34938 100644 --- a/common/gin.go +++ b/common/gin.go @@ -40,7 +40,7 @@ func GetRequestBody(c *gin.Context) ([]byte, error) { } } maxMB := constant.MaxRequestBodyMB - if maxMB < 0 { + if maxMB <= 0 { // no limit body, err := io.ReadAll(c.Request.Body) _ = c.Request.Body.Close()