all repos — honk @ b6adb24c1b55c2213893cdd2c56e72225f0618da

my fork of honk

debug prints
Anirudh Oppiliappan x@icyphox.sh
Thu, 04 Apr 2024 01:15:09 +0300
commit

b6adb24c1b55c2213893cdd2c56e72225f0618da

parent

919621cce0a4d582bffb7bcacec985e182d4c824

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M web.goweb.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 = ""