mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 22:45:05 +00:00
Also strip cgi variables (things after ?) in key request for checking.
This commit is contained in:
parent
195c21ab2e
commit
de6d61f66f
1 changed files with 8 additions and 3 deletions
11
http.c
11
http.c
|
@ -171,10 +171,15 @@ int check_signature(xs_dict *req, xs_str **err)
|
||||||
if ((p = strchr(keyId, '#')) != NULL)
|
if ((p = strchr(keyId, '#')) != NULL)
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
|
||||||
xs *actor = NULL;
|
/* also strip cgi variables */
|
||||||
|
if ((p = strchr(keyId, '?')) != NULL)
|
||||||
|
*p = '\0';
|
||||||
|
|
||||||
if (!valid_status(actor_request(NULL, keyId, &actor))) {
|
xs *actor = NULL;
|
||||||
*err = xs_fmt("unknown actor %s", keyId);
|
int status;
|
||||||
|
|
||||||
|
if (!valid_status((status = actor_request(NULL, keyId, &actor)))) {
|
||||||
|
*err = xs_fmt("actor request error %s %d", keyId, status);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue