diff options
author | default <nobody@localhost> | 2023-12-18 10:07:42 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2023-12-18 10:07:42 +0100 |
commit | de6d61f66fd70feb2c0c7e7cce46413062968c31 (patch) | |
tree | ad8f50cf99394ea8b0070b2535d8e9f2b405c21b /http.c | |
parent | 195c21ab2eb3217e9a018dd928e06c201f00a791 (diff) |
Also strip cgi variables (things after ?) in key request for checking.
Diffstat (limited to 'http.c')
-rw-r--r-- | http.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -171,10 +171,15 @@ int check_signature(xs_dict *req, xs_str **err) if ((p = strchr(keyId, '#')) != NULL) *p = '\0'; + /* also strip cgi variables */ + if ((p = strchr(keyId, '?')) != NULL) + *p = '\0'; + xs *actor = NULL; + int status; - if (!valid_status(actor_request(NULL, keyId, &actor))) { - *err = xs_fmt("unknown actor %s", keyId); + if (!valid_status((status = actor_request(NULL, keyId, &actor)))) { + *err = xs_fmt("actor request error %s %d", keyId, status); return 0; } |