summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-12-10 10:27:45 +0100
committerdefault <nobody@localhost>2023-12-10 10:27:45 +0100
commit90179f84596e7885fade4552cbeac0beb5c53303 (patch)
treeecae50149124ee87fbe91fc6131176bcc28baeb0 /http.c
parent1c194042580249fae3b54ea00517c399d8bc7b77 (diff)
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,
}
-int check_signature(snac *snac, xs_dict *req, xs_str **err)
+int check_signature(snac *user, xs_dict *req, xs_str **err)
/* check the signature */
{
char *sig_hdr = xs_dict_get(req, "signature");
@@ -173,7 +173,7 @@ int check_signature(snac *snac, xs_dict *req, xs_str **err)
xs *actor = NULL;
- if (!valid_status(actor_request(snac, keyId, &actor))) {
+ if (!valid_status(actor_request(user, keyId, &actor))) {
*err = xs_fmt("unknown actor %s", keyId);
return 0;
}