aboutsummaryrefslogtreecommitdiff
path: root/gmid.h
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2022-03-26 11:32:26 +0000
committerOmar Polo <op@omarpolo.com>2022-03-26 11:32:26 +0000
commit3fdc457c8db0550a6143ab626bfefe3351ab0b93 (patch)
tree270df0a78a404e55e5d733e388747e56c1207e7a /gmid.h
parent409a2599b30159207a7d4da6a7fd7aede4a4327f (diff)
swap try_client_by_id with client_by_id
i.e. allow client_by_id to fail and return NULL. Initially I thought it was a good idea to shut down a server process if we receive an invalid client id as reply from one of our requests to the executor process. This turned out not to be correct since a client can (read: will) disconnect in the delay beteewn we acknowledge their request and the cgi script execution. The fastcgi and proxy handler already handled this situation, so they're unaffected. This allows an attacker to make gmid unresponsible by just making enough requests until they hit the right timing.
Diffstat (limited to 'gmid.h')
-rw-r--r--gmid.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gmid.h b/gmid.h
index a6741bf..6dd1932 100644
--- a/gmid.h
+++ b/gmid.h
@@ -373,7 +373,7 @@ void mark_nonblock(int);
void client_write(struct bufferevent *, void *);
void start_reply(struct client*, int, const char*);
void client_close(struct client *);
-struct client *try_client_by_id(int);
+struct client *client_by_id(int);
void loop(struct tls*, int, int, struct imsgbuf*);
int client_tree_cmp(struct client *, struct client *);