From 42cf749f7923ac33194ab87b8dce060f46a220bc Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sun, 6 Jun 2021 12:39:06 -0700 Subject: signature verify arguments mixed up fix --- outboxPost.go | 11 ++++++----- verification.go | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/outboxPost.go b/outboxPost.go index 2a06211..83859ad 100644 --- a/outboxPost.go +++ b/outboxPost.go @@ -544,11 +544,12 @@ func CheckCaptcha(db *sql.DB, captcha string) bool { func ParseInboxRequest(w http.ResponseWriter, r *http.Request, db *sql.DB) { activity := GetActivityFromJson(r, db) - // if !VerifyHeaderSignature(r, *activity.Actor) { - // response := RejectActivity(activity) - // MakeActivityRequest(db, response) - // return - // } + if !VerifyHeaderSignature(r, *activity.Actor) { + fmt.Println(*activity.Actor) + response := RejectActivity(activity) + MakeActivityRequest(db, response) + return + } switch(activity.Type) { case "Create": diff --git a/verification.go b/verification.go index e193746..86b539e 100644 --- a/verification.go +++ b/verification.go @@ -611,7 +611,7 @@ func VerifyHeaderSignature(r *http.Request, actor Actor) bool { return false } - if ActivityVerify(actor, sig, encSig) != nil { + if ActivityVerify(actor, encSig, sig) != nil { return false } -- cgit v1.2.3