From 6c8ec4deda45b39eb12b9d24e6ef43ab4b7d827f Mon Sep 17 00:00:00 2001 From: cyal1 <33282478+cyal1@users.noreply.github.com> Date: Thu, 28 Mar 2024 23:05:09 +0800 Subject: [PATCH] fixed open redirect --- gin.go | 1 + 1 file changed, 1 insertion(+) diff --git a/gin.go b/gin.go index 1633fe13..69bf1673 100644 --- a/gin.go +++ b/gin.go @@ -699,6 +699,7 @@ func redirectTrailingSlash(c *Context) { p = prefix + "/" + req.URL.Path } req.URL.Path = p + "/" + p = regRemoveRepeatedChar.ReplaceAllString(p, "/") if length := len(p); length > 1 && p[length-1] == '/' { req.URL.Path = p[:length-1] }