diff options
author | FChannel <> | 2021-06-25 14:55:18 -0700 |
---|---|---|
committer | FChannel <> | 2021-06-25 14:55:18 -0700 |
commit | 80bcce22a2368c3911137dec97d6744dee328809 (patch) | |
tree | 0030d95bd0cc32562dd4652e93920e86188fcac5 /outboxPost.go | |
parent | 3b806e4603a7da8bb6a24029a0115e18a6b7ba5b (diff) |
more cleaning up to better intergrate with plemroma standards. can verify signatures better
Diffstat (limited to 'outboxPost.go')
-rw-r--r-- | outboxPost.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/outboxPost.go b/outboxPost.go index 774ac62..5772932 100644 --- a/outboxPost.go +++ b/outboxPost.go @@ -512,6 +512,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 activity.Actor.PublicKey.Id == "" { + nActor := FingerActor(activity.Actor.Id) + activity.Actor = &nActor + } + if !VerifyHeaderSignature(r, *activity.Actor) { response := RejectActivity(activity) MakeActivityRequest(db, response) |