reject origin test in getjunk path to catch strays
Ted Unangst tedu@tedunangst.com
Sat, 05 Aug 2023 20:52:55 -0400
1 files changed,
3 insertions(+),
0 deletions(-)
jump to
M
activity.go
→
activity.go
@@ -133,6 +133,9 @@
var signGets = true func GetJunkTimeout(userid int64, url string, timeout time.Duration) (junk.Junk, error) { + if rejectorigin(userid, url, false) { + return nil, fmt.Errorf("rejected origin: %s", url) + } client := http.DefaultClient sign := func(req *http.Request) error { var ki *KeyInfo