debug prints
Anirudh Oppiliappan x@icyphox.sh
Thu, 04 Apr 2024 01:15:09 +0300
1 files changed,
4 insertions(+),
0 deletions(-)
jump to
M
web.go
→
web.go
@@ -24,6 +24,7 @@ "errors"
"fmt" "html/template" "io" + "log" notrand "math/rand" "mime/multipart" "net"@@ -2435,11 +2436,14 @@ 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) if strings.HasPrefix(name, "@") { url = fmt.Sprintf("https://%s/%s", serverName, name) name = name[1:] } + log.Println("orig", orig) if url != orig { ilog.Printf("foreign request rejected") name = ""