From 8244af05eaa9f66df12095c76309b454bde525d7 Mon Sep 17 00:00:00 2001 From: FChannel <=> Date: Mon, 18 Jan 2021 04:41:21 -0800 Subject: fixed sql injection vulnerabilites. --- OutboxPost.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'OutboxPost.go') diff --git a/OutboxPost.go b/OutboxPost.go index 9d39eff..dacf77e 100644 --- a/OutboxPost.go +++ b/OutboxPost.go @@ -107,10 +107,12 @@ func ParseOutboxRequest(w http.ResponseWriter, r *http.Request, db *sql.DB) { verification := GetVerificationByCode(db, activity.Auth) var rActivity Activity - + fmt.Println("ok") if validActor && validLocalActor && verification.Board == activity.Actor.Id || verification.Board == Domain { + fmt.Println("yes") rActivity = AcceptFollow(activity, actor) } else { + fmt.Println("no") rActivity = RejectFollow(activity, actor) rActivity.Summary = "No valid actor or Actor is not located here" } @@ -506,7 +508,6 @@ func CheckCaptcha(db *sql.DB, captcha string) bool { func ParseInboxRequest(w http.ResponseWriter, r *http.Request, db *sql.DB) { activity := GetActivityFromJson(r, db) - switch(activity.Type) { case "Create": for _, e := range activity.Object.InReplyTo { -- cgit v1.2.3