diff options
-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 } |