1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-10 13:10:33 +08:00

vuln: Fix GO-2025-3770 vulnerability

This commit is contained in:
João "Pisco" Fernandes
2025-08-07 12:34:45 +01:00
parent 1cedefa1c2
commit 6c3df26b3c
13 changed files with 148 additions and 48 deletions

21
vendor/github.com/go-chi/chi/v5/path_value.go generated vendored Normal file
View File

@@ -0,0 +1,21 @@
//go:build go1.22 && !tinygo
// +build go1.22,!tinygo
package chi
import "net/http"
// supportsPathValue is true if the Go version is 1.22 and above.
//
// If this is true, `net/http.Request` has methods `SetPathValue` and `PathValue`.
const supportsPathValue = true
// setPathValue sets the path values in the Request value
// based on the provided request context.
func setPathValue(rctx *Context, r *http.Request) {
for i, key := range rctx.URLParams.Keys {
value := rctx.URLParams.Values[i]
r.SetPathValue(key, value)
}
}