From: Guus Sliepen Date: Fri, 6 Mar 2020 22:24:49 +0000 (+0100) Subject: Don't abort on empty lines in receive_request(). X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=3bba8e95482de6f03d04dba4808e9add2071296b;p=meshlink Don't abort on empty lines in receive_request(). Remove the assertion that lines are not empty, since this could lead to a DoS attack. Empty lines are already handled correctly by the rest of the logic in receive_request(). --- diff --git a/src/protocol.c b/src/protocol.c index fa1dc137..b4cb5ad5 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -129,7 +129,6 @@ void forward_request(meshlink_handle_t *mesh, connection_t *from, submesh_t *s, bool receive_request(meshlink_handle_t *mesh, connection_t *c, const char *request) { assert(request); - assert(*request); if(c->outgoing && mesh->proxytype == PROXY_HTTP && c->allow_request == ID) { if(!request[0] || request[0] == '\r') {