Blob


1 2022-09-07 Omar Polo <op@omarpolo.com>
3 * ge.c (main): add `ge': small program to quickly export a directory over Gemini.
5 2022-09-06 Omar Polo <op@omarpolo.com>
7 * server.c: drop CGI support.
8 * sandbox.c: optionally disable the sandbox on non-OpenBSD when fastcgi or proxy are used. New sockets can't be opened under FreeBSD' capsicum(4) and a huge pain in the arse under Linux' seccomp/landlock. Patches welcome!
10 2022-07-07 Omar Polo <op@omarpolo.com>
12 * log.c (logger_main): fix timestamps in log files. Reported by Karl Jeacle, thanks!
14 * dirs.c (scandir_fd): drop d_reclen; it's not available on DragonflyBSD (at least.)
16 2022-07-07 Anna “CyberTailor”
18 * Makefile: include contrib/ in dist
20 2022-07-04 Omar Polo <op@omarpolo.com>
22 * contrib/gmid: remove OpenBSD' rc file: it's now maintained in the ports tree
24 * configure (VERSION): 1.8.4 tagged
26 * server.c (check_path): log when it fails to open a file because of permissions
27 (client_write): encode file names in the directory index, spotted by cage
28 (client_write): add a trailing / for dirs in the directory index.
30 * iri.c (parse_path): allow '@' and ':' in paths
32 2022-04-08 Omar Polo <op@omarpolo.com>
34 * mime.c (mime): do a binary search to match the MIME time
36 * gmid.c (listener_main): don't load the default mime listing when
37 `types' is used. (text/gemini -> gmi/gemini is still hardcoded)
39 * mime.c (add_mime): fix memory leak in the mime handling
41 2022-04-07 Omar Polo <op@omarpolo.com>
43 * gmid.conf.5: move config file documentation into a new man page
45 * parse.y (option): deprecate `map' rule in favour of the `types' block
47 2022-03-27 Omar Polo <op@omarpolo.com>
49 * configure (VERSION): 1.8.3 tagged
51 * server.c (start_cgi): fix a possible out-of-bound access in the
52 CGI handling.
54 2022-03-26 Omar Polo <op@omarpolo.com>
56 * configure (VERSION): 1.8.2 tagged
58 * server.c (handle_imsg_cgi_res): fix a CGI timing issue: if a
59 connection handled by a CGI scripts is interrupted with the right
60 timing it causes the server process to exit with "fatal in
61 client_by_id: invalid id X"
63 2022-02-26 Omar Polo <op@omarpolo.com>
65 * parse.y: add the types block
67 2022-02-13 Omar Polo <op@omarpolo.com>
69 * sandbox.c (filter): tightens seccomp policy wrt openat: allow
70 only with the O_RDONLY flag.
72 2022-02-13 Tobias Berger <tobi.berger13@gmail.com>
74 * sandbox.c (filter): allow fstatat64, llseek and sigreturn;
75 needed by glibc on armv7
77 2022-02-10 Omar Polo <op@omarpolo.com>
79 * configure (VERSION): 1.8.1 tagged
81 * sandbox.c (open_landlock): fix landlock usage
83 2022-01-30 Omar Polo <op@omarpolo.com>
85 * configure (VERSION): 1.8 “Lightbulb Sun” tagged
87 * proxy.c (proxy_setup_tls): allow to specify a custom hostname as SNI for the TLS handshake with the proxied host.
89 2022-01-02 Omar Polo <op@omarpolo.com>
91 * server.c (matched_proxy): allow to specify multiple proxy blocks and add matching rules
93 * parse.y (servbody): relax the strict ordering of options, location and proxy blocks
95 2022-01-01 Omar Polo <op@omarpolo.com>
97 * proxy.c (proxy_init): add support for client certificate when proxying
99 2021-12-29 Omar Polo <op@omarpolo.com>
101 * proxy.c (proxy_init): add proxying support via `proxy relay-to'
103 2021-12-11 Max <vdrummer@posteo.net>
105 * sandbox.c (filter): [seccomp]: allow ugetrlimit(2), needed by glibc on armv7l
107 2021-12-09 Omar Polo <op@omarpolo.com>
109 * server.c (client_read): don't check if the port in the request is the same we're listening on. Suggested by Allen Sobot, thanks!
110 * configure: add --prefix=... long argument.
112 2021-11-16 Omar Polo <op@omarpolo.com>
114 * configure (singletest): fix the cross-compilation: don't run the test binaries just built. Suggested by Nikolay Korotkiy (@sikmir), thanks!
116 2021-10-24 Omar Polo <op@omarpolo.com>
118 * log.c (log_request): fix "double slash" in logs: gmid ended up printing two slashes between the hostname and the path when logging the request IRI.
120 2021-10-15 Stephen Gregoratto <dev@sgregoratto.me>
122 * gmid.c (add_keypair): implement OCSP stapling support
124 2021-10-13 Omar Polo <op@omarpolo.com>
126 * server.c (do_accept): don't die on ECONNABORTED (``Software caused connection abort'')
128 2021-10-11 Omar Polo <op@omarpolo.com>
130 * contrib/renew-certs: add script to automatically renew self-signed certificates
132 2021-10-09 Omar Polo <op@omarpolo.com>
134 * parse.y (print_conf): multiple -n to dump the parsed configuration
136 * contrib/gencert: add gencert, a simple script to generate self-signed certs
138 2021-10-04 Omar Polo <op@omarpolo.com>
140 * regress/lib.sh (raw): reduced the timeout time for single checks from 30 to 10 seconds
142 * regress/runtime: regression test restructured. still implemented as a set of POSIX-scripts
144 2021-10-02 Omar Polo <op@omarpolo.com>
146 * server.c (client_read): reworked the internal structure. Now we leverage libevent' bufferevents more.
147 (cgi_read): be more strict with CGI scripts: don't pass through illegal CGI responses.
149 2021-09-26 Omar Polo <op@omarpolo.com>
151 * fcgi.c (fcgi_req): the FastCGI implementation is fully asynchronous
153 2021-09-24 Omar Polo <op@omarpolo.com>
155 * configure (VERSION): 1.7.4 tagged
157 * server.c (check_for_cgi): fix out-of-bound access, found with lots of help from cage, thanks!
159 2021-09-19 Omar Polo <op@omarpolo.com>
161 * sandbox.c (gmid_create_landlock_rs): [linux] use landlock on the server and logger process to reduce the fs access
163 * configure (VERSION): 1.7.3 tagged
165 2021-09-17 Omar Polo <op@omarpolo.com>
167 * log.c (logger_main): fix syslog logging on FreeBSD
169 2021-08-24 Omar Polo <op@omarpolo.com>
171 * gmid.c (main): don't crash on -n without -c
173 2021-07-29 Anna “CyberTailor”
175 * gmid.1: document logging, openssl key generation example, spelling/grammar and crosslinks
177 2021-07-27 Omar Polo <op@omarpolo.com>
179 * server.c (check_path): allow symlinks
181 2021-07-23 Omar Polo <op@omarpolo.com>
183 * sandbox.c: seccomp allow fstat64 (used by glibc an aarch64). Reported by pine, thanks!
185 2021-07-19 Omar Polo <op@omarpolo.com>
187 * gmid.c (setup_configless): unbreak configless mode
189 2021-07-13 Anna “CyberTailor”
191 * parse.y (yyerror): error and warning messages are prefixed with "error:" and "warning:"
192 (yywarn): fix off-by-one line number in warnings
194 2021-07-11 Omar Polo <op@omarpolo.com>
196 * configure (VERSION): 1.7.1 tagged
198 2021-07-11 Anna “CyberTailor”
200 * gmid.1 (common): fix misleading example in man page: macros names may not be reserved words
202 2021-07-10 Omar Polo <op@omarpolo.com>
204 * configure (VERSION): 1.7 tagged
206 2021-07-09 Omar Polo <op@omarpolo.com>
208 * parse.y (STRING): add `include' directive
209 (yylex): add @-macros (real macros)
211 2021-07-08 Omar Polo <op@omarpolo.com>
213 * parse.y (option): rename `mime MIME EXT' to `map MIME to-ext EXT', but retain the old `mime' for compatibility.
215 2021-07-06 Omar Polo <op@omarpolo.com>
217 * regress/gg.c (main): add -T timeout
219 * configure (guessing_cflags): try to preserve CFLAGS/LDFLAGS
221 2021-07-02 Omar Polo <op@omarpolo.com>
223 * sandbox.c (filter): seccomp filter reworked: now it should work on x86 and possibly other arches too!
225 2021-06-29 Omar Polo <op@omarpolo.com>
227 * parse.y (conf): don't require the strict order macro > options > servers
228 c-like strings: when two or more strings are next to each others, concat them
230 * gmid.c (main): add -D to define macros from the cmd line
232 * parse.y (yylex): allow to define macros in the config file
234 * gmid.c (main): use getopt_long, add --help as synonym of -h and -V/--version
236 2021-06-17 Omar Polo <op@omarpolo.com>
238 * gmid.1: document `log' option
240 2021-06-16 Omar Polo <op@omarpolo.com>
242 * parse.y (yylex): drop the dependency on lex by implementing
243 yylex by ourselves (the actual implementation is based off doas'
244 parse.y). This gave us various benefits, like cleaner code, \ to
245 break long lines, better handling of quotes etc...
247 2021-06-11 Omar Polo <op@omarpolo.com>
249 * parse.y (servopt): add `param' keyword
251 * fcgi.c (send_fcgi_req): send GATEWAY_INTERFACE, AUTH_TYPE,
252 REMOTE_USER, TLS_CLIENT_ISSUER, TLS_CLIENT_HASH, TLS_VERSION,
253 TLS_CIPHER, TLS_CIPHER_STRENGTH and TLS_CLIENT_NOT_BEFORE/AFTER.
254 (send_fcgi_req): support a custom list of params
256 2021-05-24 Omar Polo <op@omarpolo.com>
258 * gg.c: move `gg' to regress, as it's only used for the tests
260 2021-05-12 Omar Polo <op@omarpolo.com>
262 * utils.c (gen_certificate): don't add gmid as organisation when generating the certificate, and now it set the version 3, so it's compatible with java/android
264 2021-05-09 Omar Polo <op@omarpolo.com>
266 * server.c (apply_fastcgi): added fastcgi support!
268 2021-05-03 Omar Polo <op@omarpolo.com>
270 * parse.y: errors on duplicate values instead of silently using only the last value.
272 2021-04-30 Omar Polo <op@omarpolo.com>
274 * server.c (fmt_sbuf): ensure %p (path) is always absolute
276 * gmid.c (load_vhosts): allow ``root'' rule to be specified per-location block
278 2021-04-29 Omar Polo <op@omarpolo.com>
280 * parse.y (servopt): added ``alias'' option to define hostname aliases for a server
282 2021-04-28 Omar Polo <op@omarpolo.com>
284 * gmid.c (main): pidfile support with `-P pidfile'
286 2021-04-27 Omar Polo <op@omarpolo.com>
288 * parse.y (servopt): added ``env'' option to define environment vars for CGI scripts
290 * log.c (fatal): lower the log priority for fatal errors from CRIT to ERR
292 2021-04-25 Omar Polo <op@omarpolo.com>
294 * server.c (open_dir): sort the auto index alphabetically
296 2021-04-21 Omar Polo <op@omarpolo.com>
298 * mime.c (load_default_mime): use `text/x-patch' for .patch and .diff files
300 2021-04-14 Omar Polo <op@omarpolo.com>
302 * log.c (handle_imsg_log): print the datetime when logging to stderr
304 2021-04-13 Omar Polo <op@omarpolo.com>
306 * ex.c (launch_cgi): define TLS_VERSION, TLS_CIPHER and TLS_CIPHER_STRENGTH for CGI scripts
308 2021-04-12 Omar Polo <op@omarpolo.com>
310 * 1.6.1 tagged
312 * iri.c (path_clean): fix possible infinite loop in the IRI parsing code.
314 2021-03-31 Omar Polo <op@omarpolo.com>
316 * gmid.h (struct vhost): remove limits on the number of vhosts and location blocks
318 * gmid.c (mkdirs): fix recursive mkdirs for configless mode
320 2021-03-29 Omar Polo <op@omarpolo.com>
322 * Makefile (static): fixed `static' target
324 2021-03-29 kornellapacz @ github
326 * Dockerfile: add missing libevent-dev dependency, thanks!
328 2021-03-27 Omar Polo <op@omarpolo.com>
330 * gmid.h (struct client): correctly handle CGI scripts that replies with the maximum header length allowed
332 2021-03-20 Omar Polo <op@omarpolo.com>
334 * 1.6 tagged
336 * sandbox.c (sandbox_logger_process): add capsicum to the logger process
338 2021-03-19 Omar Polo <op@omarpolo.com>
340 * gmid.c (main): use imsg for all IPC; only the main process
341 listens for SIGHUP: this means that finally the config reload will
342 work with OpenBSD' rc (and probably other service manager too)
344 2021-02-22 Omar Polo <op@omarpolo.com>
346 * log.c (log_request): add `log on/off' to enable/disable logs per-server or per-location
348 2021-02-09 Omar Polo <op@omarpolo.com>
350 * parse.y (locopt): add `require client ca' rule to require client certs signed by a specified CA
352 2021-02-07 Omar Polo <op@omarpolo.com>
354 * ex.c (do_exec): [cgi] split the query in words if needed and add them to the argv
355 (launch_cgi): define TLS_CLIENT_NOT_BEFORE/NOT_AFTER in CGI scripts
357 * parse.y (option): added prefork option
359 2021-02-06 Omar Polo <op@omarpolo.com>
361 * parse.y (locopt): added ``block return'' and ``strip'' options
362 (servopt): add the ``entrypoint'' option
364 2021-02-05 Omar Polo <op@omarpolo.com>
366 * iri.c (parse_query): don't %-decode the query part. This affects the value of QUERY_STRING for CGI scripts too, since that must be %-encoded and we're currently shipping it decoded.
368 2021-02-04 Omar Polo <op@omarpolo.com>
370 * gmid.c (main): reload configuration on SIGHUP, without disconnecting the clients
372 2021-02-02 Omar Polo <op@omarpolo.com>
374 * server.c (handle_dirlist_head): print the header in the directory listing
375 (open_file): cgi follows globbing rules, just like location and hostname matching
377 2021-02-01 Omar Polo <op@omarpolo.com>
379 * parse.y (servopt): require absolute paths in config file
381 2021-01-31 Omar Polo <op@omarpolo.com>
383 * gmid.c (main): cgi scripts now have only std{in,out,err} open
385 2021-01-30 Omar Polo <op@omarpolo.com>
387 * 1.5 tagged
388 * server.c: change precedence of location rules
390 2021-01-29 Omar Polo <op@omarpolo.com>
392 * iri.c (parse_authority): accept a wider range of unicode
393 codepoints while parsing the host name.
395 2021-01-26 Omar Polo <op@omarpolo.com>
397 * puny.c (puny_decode): initial punycode support!
399 2021-01-25 Omar Polo <op@omarpolo.com>
401 * gmid.1: manpage improvements (example and usage)
403 * gmid.c (main): Dropping -C, -K, -f, changing the meaning of -d:
404 now it's the certificate directory. Serve the directory given as
405 positional argument (or the current one) when running in
406 config-less mode.
407 (gen_certificate): automatically generate a certificate
409 * parse.y (option): added chroot and user options
411 2021-01-24 Omar Polo <op@omarpolo.com>
413 * server.c (open_dir): add directory listing (disabled by default)
415 * parse.y (vhost): added support for location blocks
417 * server.c (send_dir): make the directory index customizable
419 2021-01-23 Omar Polo <op@omarpolo.com>
421 * gg.c (main): added gg, a barebone gemini client. used by the
422 regress suite
424 2021-01-21 Omar Polo <op@omarpolo.com>
426 * configure: added a configure script
428 * server.c (handle_handshake): glob for vhost domain
430 * gmid.c (log_request): logs the full IRI and the response code (even for CGI)
432 2021-01-19 Omar Polo <op@omarpolo.com>
434 * parse.y (servopt): add "lang" server option
435 (servopt): moving "default type" from global options to server options
437 * Dockerfile: add a dockerfile
439 2021-01-18 Omar Polo <op@omarpolo.com>
441 * parse.y (option): add mime and "default type" options for media types.
443 2021-01-17 Omar Polo <op@omarpolo.com>
445 * sandbox.c (sandbox): added initial seccomp(2) support
447 2021-01-15 Omar Polo <op@omarpolo.com>
449 * cgi.c (start_cgi): set SERVER_NAME to the vhost when executing CGI scripts
451 * parse.y (option): add ability to specify the tls versions with "protocols"
453 * gmid.c (handle_open_conn): ensure the port number of the request matches
455 * sandbox.c (sandbox): sandbox on OpenBSD (pledge/unveil, as before) and on FreeBSD (capsicum) too
457 * sample.conf: added sample configuration
459 * gmid.c (main): changed behaviour: daemon off by default
460 (main): changed -c in -C (cert option)
461 (main): changed -k in -K (key option, for consistency with -C)
462 (main): added -c to load a configuration
463 (main): certs, key and doc (-C -K and -d) doesn't have a default value anymore
464 (handle_handshake): add vhosts support
466 2021-01-13 Omar Polo <op@omarpolo.com>
468 * iri.c (parse_scheme): normalize scheme while parsing, so we're
469 RFC3986 compliant.
471 2021-01-11 Omar Polo <op@omarpolo.com>
473 * 1.4 and 1.4.1 tagged
475 * gmid.c (main): ipv6 disabled by default and -6 flag to enable it
476 (handle): reject non-gemini protocols with 53
478 2021-01-10 Omar Polo <op@omarpolo.com>
480 * gmid.c (logs): log also the port of the client
481 (loop): accept both ipv4 and ipv6
483 2020-12-26 Omar Polo <op@omarpolo.com>
485 * uri.c (parse_uri): IRI support
487 2020-12-21 Omar Polo <op@omarpolo.com>
489 * gmid.c (main): -d supports relative paths
491 2020-12-02 Omar Polo <op@omarpolo.com>
493 * gmid.c: logging reworked and daemonize. The -l option was
494 removed: now it logs on syslog if -f (foreground) is not passed.
496 2020-11-18 Omar Polo <op@omarpolo.com>
498 * 1.3.2 tagged
500 * gmid.c (url_after_proto): fix bug introduced in last version
501 regarding full URLs with explicit gemini protocol.
503 * 1.3.1 tagged
505 * gmid.c (url_after_proto): correct url parsing: accept URLs
506 without explicit protocol
507 (url_start_of_request): correct handling of relative URLs
509 2020-11-17 Omar Polo <op@omarpolo.com>
511 * gmid.c (main): add flag -p to change the port
513 2020-11-10 Omar Polo <op@omarpolo.com>
515 * ChangeLog: 1.3 tagged, fixed ChangeLog format
517 * gmid.c (open_file): added support for path parameters for CGI
518 scripts
520 2020-11-06 Omar Polo <op@omarpolo.com>
522 * gmid.1: great improvements to the documentation
524 * gmid.c (url_after_proto): ensure that the requested protocol is
525 “gemini” and not something else that’s long 6 bytes.
527 * gmid.c (loop): added support for cgi scripts (can handle multiple
528 concurrently)
530 2020-11-06 Omar Polo <op@venera>
532 * gmid.1: added option to log to a file
534 2020-11-05 Omar Polo <op@omarpolo.com>
536 * gmid.c (filetypes): add MIME type for xml files
538 2020-11-03 Omar Polo <op@omarpolo.com>
540 * 1.2 tagged
542 * gmid.c (main): ignore SIGPIPE
544 2020-10-14 Omar Polo <op@omarpolo.com>
546 * 1.1 tagged
548 * switching to mmap() based file handling
550 2020-10-07 Omar Polo <op@omarpolo.com>
552 * 1.0 tagged