summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorGravatar default2023-12-10 10:27:45 +0100
committerGravatar default2023-12-10 10:27:45 +0100
commit90179f84596e7885fade4552cbeac0beb5c53303 (patch)
treeecae50149124ee87fbe91fc6131176bcc28baeb0 /http.c
parentMinor reordering code to process_input_message(). (diff)
downloadpenes-snac2-90179f84596e7885fade4552cbeac0beb5c53303.tar.gz
penes-snac2-90179f84596e7885fade4552cbeac0beb5c53303.tar.xz
penes-snac2-90179f84596e7885fade4552cbeac0beb5c53303.zip
activitypub_request() may have a NULL user.
In the NULL user case, only non-signed requests will be done, but it's probably enough for actor requests in most cases.
Diffstat (limited to 'http.c')
-rw-r--r--http.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/http.c b/http.c
index 28947ad..d7f1629 100644
--- a/http.c
+++ b/http.c
@@ -120,7 +120,7 @@ xs_dict *http_signed_request(snac *snac, const char *method, const char *url,
120} 120}
121 121
122 122
123int check_signature(snac *snac, xs_dict *req, xs_str **err) 123int check_signature(snac *user, xs_dict *req, xs_str **err)
124/* check the signature */ 124/* check the signature */
125{ 125{
126 char *sig_hdr = xs_dict_get(req, "signature"); 126 char *sig_hdr = xs_dict_get(req, "signature");
@@ -173,7 +173,7 @@ int check_signature(snac *snac, xs_dict *req, xs_str **err)
173 173
174 xs *actor = NULL; 174 xs *actor = NULL;
175 175
176 if (!valid_status(actor_request(snac, keyId, &actor))) { 176 if (!valid_status(actor_request(user, keyId, &actor))) {
177 *err = xs_fmt("unknown actor %s", keyId); 177 *err = xs_fmt("unknown actor %s", keyId);
178 return 0; 178 return 0;
179 } 179 }