瀏覽代碼

Added a key check to Undo.

grunfink 2 月之前
父節點
當前提交
62166d33af
共有 1 個文件被更改,包括 4 次插入 和 0 次删除
  1. 4 0
      activitypub.c

+ 4 - 0
activitypub.c

@@ -2813,6 +2813,10 @@ int process_input_message(snac *snac, const xs_dict *msg, const xs_dict *req)
             utype = "Follow";
         }
 
+        if (strcmp(actor, key_id)) {
+            snac_log(snac, xs_fmt("Undo: mismatched actor '%s' and key '%s'", actor, key_id));
+        }
+        else
         if (strcmp(utype, "Follow") == 0) { /** **/
             if (!id) {
                 snac_log(snac, xs_fmt("no id (msg.object.object) when "