commit 6c5fa23
V. Luna
·
2026-10-10 08:23:19 +0000 UTC
parent 4b29445
rob your grandma tomorrow
1 files changed,
+10,
-3
M
http.c
M
http.c
+10,
-3
1@@ -182,9 +182,6 @@ int check_signature(const xs_dict *req, xs_str **err, xs_str **key_id)
2 if ((p = strchr(keyId, '#')) != NULL)
3 *p = '\0';
4
5- /* copy the keyId */
6- *key_id = xs_dup(keyId);
7-
8 xs *actor = NULL;
9 int status;
10
11@@ -211,6 +208,16 @@ int check_signature(const xs_dict *req, xs_str **err, xs_str **key_id)
12 return 0;
13 }
14
15+ /* copy the keyId but prefer the key's declared owner
16+ *
17+ * fixes this bs https://codeberg.org/superseriousbusiness/gotosocial/issues/1186
18+ */
19+ {
20+ const char *owner = xs_dict_get(k, "owner");
21+
22+ *key_id = xs_dup(xs_is_string(owner) ? owner : keyId);
23+ }
24+
25 /* now build the string to be signed */
26 xs *sig_str = xs_str_new(NULL);
27