Skip to content

Commit

Permalink
use parse
Browse files Browse the repository at this point in the history
  • Loading branch information
DTCurrie committed Nov 19, 2024
1 parent 5b5a564 commit f5d55db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/backto.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f5d55db

Please sign in to comment.