fix url construction
Anirudh Oppiliappan x@icyphox.sh
Thu, 04 Apr 2024 01:18:59 +0300
1 files changed,
2 insertions(+),
4 deletions(-)
jump to
M
web.go
→
web.go
@@ -2435,15 +2435,13 @@
name := orig idx := strings.LastIndexByte(name, '/') if idx != -1 { - url := fmt.Sprintf("https://%s/%s/%s", serverName, "u", name) - log.Println("url", url) name = name[idx+1:] - log.Println("name", name) + url := fmt.Sprintf("https://%s/%s/%s", serverName, "u", name) if strings.HasPrefix(name, "@") { url = fmt.Sprintf("https://%s/%s", serverName, name) name = name[1:] } - log.Println("orig", orig) + log.Printf("orig: %s url: %s\n", orig, url) if url != orig { ilog.Printf("foreign request rejected") name = ""