From f5d55db5d0ffaa7b8924624324554c916adf8645 Mon Sep 17 00:00:00 2001 From: DTCurrie Date: Tue, 19 Nov 2024 15:48:34 -0500 Subject: [PATCH] use parse --- web/backto.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/backto.go b/web/backto.go index 70a153e9..c823579e 100644 --- a/web/backto.go +++ b/web/backto.go @@ -50,7 +50,7 @@ func isAllowedURLScheme(url *url.URL) bool { // - http://localhost/path/name -> true func IsValidBacktoURL(path string) bool { normalized := strings.ReplaceAll(path, "\\", "/") - url, err := url.ParseRequestURI(normalized) + url, err := url.Parse(normalized) if err != nil { // ignore invalid URLs/URL components return false