Commits

Commit:
543f4a66fec191b16621ae4f7783782131a3b067
From:
Omar Polo <op@omarpolo.com>
Date:
Mon Jul 4 14:31:17 2022 UTC

add a trailing / for dirs in the directory index.

Commit:
a555e0d67baef271ffe4a186326ee5f1c16fff75
From:
Omar Polo <op@omarpolo.com>
Date:
Mon Jul 4 09:48:39 2022 UTC

copyright years

Commit:
f2f8eb35c86c4e1c1d858e782c864deac0511cd3
From:
Omar Polo <op@omarpolo.com>
Date:
Mon Jul 4 09:31:36 2022 UTC

encode file names in the directory index Spotted the hard way by cage

Commit:
3bd4a6dea08fc977e314877cefed1c6fdd6b1613
From:
Omar Polo <op@omarpolo.com>
Date:
Mon Jul 4 08:25:15 2022 UTC

log when it fails to open a file because of permissions

Commit:
ea27eaaa83d61792e75858dc624c58fe1fa13dc9
From:
Omar Polo <op@omarpolo.com>
Date:
Sun Mar 27 12:52:59 2022 UTC

fix an out-of-bound access in start_cgi Long time ago, client->req was a static buffer so the memcpy was safe. However, it's been since moved to a dynamically allocated string, so it's very often smaller than sizeof(req.buf) (1024), hence the out of bound access which results in a SIGSEGV very often on OpenBSD thanks to Otto' malloc. The situation with the iri parser, client->req and how the request is forwarded to the other process needs to be improved: this is just a fix to address the issue quickly, a better one would be to restructure the iri parser APIs and rethink how the info is forwarded to the ex process.

Commit:
3fdc457c8db0550a6143ab626bfefe3351ab0b93
From:
Omar Polo <op@omarpolo.com>
Date:
Sat Mar 26 11:32:26 2022 UTC

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.

Commit:
d98ae929b23af35e2e837c97b5c20559f48d584b
From:
Omar Polo <op@omarpolo.com>
Date:
Sat Feb 19 18:11:05 2022 UTC

don't log errno, it's always zero after libtls returns The libevent error value is much more interesting! see github issue #13

Commit:
e0f6dc646d6c257869c17f16db977cd064262830
From:
Omar Polo <op@omarpolo.com>
Date:
Thu Jan 27 09:55:52 2022 UTC

improve proxy error path properly release everything when during client_close if the request was managed by a proxy.

Commit:
d28bd963c2450790bdb6bf2193af5670581c0c24
From:
Omar Polo <op@omarpolo.com>
Date:
Thu Jan 27 09:54:48 2022 UTC

always mark requests as done when their code is != 20

Commit:
b9b77f5344ba6d6116044360feb3a7927778169f
From:
Omar Polo <op@omarpolo.com>
Date:
Thu Jan 27 09:28:27 2022 UTC

fix comment

Commit:
901905e0cf0f5f141461df7ea199711ea951c919
From:
Omar Polo <op@omarpolo.com>
Date:
Wed Jan 5 18:58:01 2022 UTC

bail out of client_read if we've already decide what to do libevent2 can still somehowe call client_read even in code paths that never enable reading from the evbuffer. Can't reproduce on the libevent in base on OpenBSD. It's a bit ugly, but it's a small workaround for something that otherwise *always* make gmid crash when linked against libevent2. (client_read works under the assumption that c->host != NULL, matched_proxy crashes otherwise.)

Commit:
876a417023a6a38cc61f61bf3083305455a7f8ec
From:
Omar Polo <op@omarpolo.com>
Date:
Wed Jan 5 18:03:47 2022 UTC

tweak comment

Commit:
d474a97922f2344f57481ffcfea05d30a3d466a2
From:
Omar Polo <op@omarpolo.com>
Date:
Tue Jan 4 23:15:13 2022 UTC

add missing prototype

Commit:
ba94a608a89110740cb24ef098c476c84d371918
From:
Omar Polo <op@omarpolo.com>
Date:
Tue Jan 4 23:14:34 2022 UTC

add `require client ca' for proxy blocks refactor the code that calls validate_against_ca into an helper function to reuse it in both apply_require_ca and (optionally) in apply_reverse_proxy.

Commit:
b7967bc1f695126e1bf2705bfd486bbc32aaf8b0
From:
Omar Polo <op@omarpolo.com>
Date:
Sun Jan 2 16:33:28 2022 UTC

proxy: allow multiple proxy blocks, matching options and validations as a side effect the order of the content of a server block is relaxed: options, location or proxy blocks can be put in any order.