diff options
author | FChannel <> | 2021-06-06 12:39:06 -0700 |
---|---|---|
committer | FChannel <> | 2021-06-06 12:39:06 -0700 |
commit | 42cf749f7923ac33194ab87b8dce060f46a220bc (patch) | |
tree | 0daa34a13de81003608d0c3df6ded9a7d4eb793a | |
parent | 54cf6163db11855696e4f81623a4bae1cb040f2e (diff) |
signature verify arguments mixed up fix
-rw-r--r-- | outboxPost.go | 11 | ||||
-rw-r--r-- | 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 } |