summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--http.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/http.c b/http.c
index 4f0b2fa..125d346 100644
--- a/http.c
+++ b/http.c
@@ -182,14 +182,22 @@ int check_signature(const xs_dict *req, xs_str **err)
182 if ((p = strchr(keyId, '#')) != NULL) 182 if ((p = strchr(keyId, '#')) != NULL)
183 *p = '\0'; 183 *p = '\0';
184 184
185 /* also strip cgi variables */
186 if ((p = strchr(keyId, '?')) != NULL)
187 *p = '\0';
188
189 xs *actor = NULL; 185 xs *actor = NULL;
190 int status; 186 int status;
191 187
192 if (!valid_status((status = actor_request(NULL, keyId, &actor)))) { 188 /* does it have ? variables? */
189 if ((p = strchr(keyId, '?')) != NULL) {
190 /* try first with them */
191 if (!valid_status((status = actor_request(NULL, keyId, &actor)))) {
192 *p = '\0';
193 /* retry stripping them */
194 status = actor_request(NULL, keyId, &actor);
195 }
196 }
197 else
198 status = actor_request(NULL, keyId, &actor);
199
200 if (!valid_status(status)) {
193 *err = xs_fmt("actor request error %s %d", keyId, status); 201 *err = xs_fmt("actor request error %s %d", keyId, status);
194 return 0; 202 return 0;
195 } 203 }