diff options
| -rw-r--r-- | activitypub.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c index 28c8045..7360af1 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -806,6 +806,14 @@ int process_message(snac *snac, char *msg, char *req) | |||
| 806 | 806 | ||
| 807 | /* check the signature */ | 807 | /* check the signature */ |
| 808 | if (!check_signature(snac, req)) { | 808 | if (!check_signature(snac, req)) { |
| 809 | { | ||
| 810 | xs *j = xs_json_dumps_pp(req, 4); | ||
| 811 | FILE *f; | ||
| 812 | if ((f = fopen("/tmp/snac-bad-signature.json", "w")) != NULL) { | ||
| 813 | fwrite(j, strlen(j), 1, f); | ||
| 814 | fclose(f); | ||
| 815 | } | ||
| 816 | } | ||
| 809 | snac_log(snac, xs_fmt("bad signature")); | 817 | snac_log(snac, xs_fmt("bad signature")); |
| 810 | return 1; | 818 | return 1; |
| 811 | } | 819 | } |