diff options
author | FChannel <=> | 2021-01-28 16:24:39 -0800 |
---|---|---|
committer | FChannel <=> | 2021-01-28 16:24:39 -0800 |
commit | 0e07bcac00acdafd2f029fb54bfd2487ef2994ce (patch) | |
tree | 455bd498f40c32dca0e53716ce22a1b7310da50b /OutboxPost.go | |
parent | 78cbbad268b88e6517a1e298ab66a99f8d3f8704 (diff) |
auth for all activity req
Diffstat (limited to 'OutboxPost.go')
-rw-r--r-- | OutboxPost.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/OutboxPost.go b/OutboxPost.go index 16d9f5f..550345d 100644 --- a/OutboxPost.go +++ b/OutboxPost.go @@ -507,7 +507,10 @@ func ParseInboxRequest(w http.ResponseWriter, r *http.Request, db *sql.DB) { header := r.Header.Get("Authorization") auth := strings.Split(header, " ") + if len(auth) < 2 { + response := RejectActivity(activity) + MakeActivityRequest(db, response) return } @@ -516,7 +519,7 @@ func ParseInboxRequest(w http.ResponseWriter, r *http.Request, db *sql.DB) { MakeActivityRequest(db, response) return } - + switch(activity.Type) { case "Create": for _, e := range activity.To { |