Commit Graph

192 Commits

Author SHA1 Message Date
Solderpunk b16a8584a6 Merge pull request 'Added pledge(2) and unveil(2) system calls to improve security on OpenBSD.' (#13) from kvothe/molly-brown:master into master
Reviewed-on: #13
2023-02-08 17:54:29 +00:00
Solderpunk 0d5d67c86d Forcibly ingest Kool-Aid. 2023-02-08 18:53:29 +01:00
Solderpunk 3be10b82d7 Allow no access logging with empty string log file path. 2023-02-07 19:59:43 +01:00
Solderpunk 443bfd4bbd Change to error logging behaviour (stderr instead of stdout, by default). 2023-02-07 19:33:14 +01:00
Solderpunk 16bf8e0534 Refuse to use a world-readable TLS key. 2023-02-07 19:23:35 +01:00
Solderpunk c0d0c0991c Update date and email address in LICENSE. 2023-02-07 19:12:24 +01:00
Solderpunk 8541b6194b Resolve non-absolute values of CGIPaths relative to DocBase. Closes #24. 2023-02-05 16:54:07 +01:00
Solderpunk 2d6f4db38e Add -v flag to print version and exit. Closes #23. 2023-02-05 15:36:18 +01:00
Solderpunk d9e0fed193 Tidy up DirectorySubdirsFirst sorting code by doing two consecutive sorts. Closes #30. 2023-02-05 15:04:49 +01:00
Solderpunk 8446885f56 Rename DirectoriesFirst option to DirectorySubdirsFirst and document in README. 2023-02-05 14:35:29 +01:00
Russ Magee 67d509a234 Sort directory listings with directories before files 2023-02-05 13:36:16 +01:00
Solderpunk 733e518392 Accept requests where the URL has a FQDN hostname with a trailing dot. Closes #20. 2023-01-29 12:29:01 +01:00
Solderpunk a41898b012 Add DefaultEncoding option to config/.molly files. Closes #19. 2023-01-29 12:07:52 +01:00
Solderpunk f05bab2b73 Make test of request URL hostname against configured hostname case insensitive. Closes #29. 2023-01-28 19:22:31 +01:00
Solderpunk 16ed9e5cff Allow redirects to other hosts. Closes #26. 2023-01-28 19:16:11 +01:00
Solderpunk e42c366565 Merge pull request 'Add FreeBSD example rc script' (#25) from ecliptik/molly-brown:freebsd-rc-example into master
Reviewed-on: #25
2021-05-01 14:48:48 +00:00
Micheal Waltz b73e10ad58
Add FreeBSD example rc script 2021-04-25 01:11:15 -07:00
Solderpunk 92cd40db12 Allow access and error logging to stdout by configuring a path of "-".
Thanks to @icedquinn@blob.cat for the suggestion.
2021-01-24 17:09:47 +01:00
Solderpunk e06f8bddbc Fix infinite redirect bug.
Previously, URLs without trailing slashes in the path which
resolved to directories caused infinite redirects if there was
anything in the URL after the path (like a query).

Thanks to both Luke Emmet and Stephane Bortzmeyer for reporting
this!
2021-01-24 16:27:53 +01:00
Solderpunk 3d4d830e98 Merge pull request 'Add "AUTH_TYPE" environment variable when client cert is present' (#14) from khuxkm/molly-brown:master into master
Reviewed-on: #14
2020-12-27 20:21:49 +00:00
Solderpunk 2e4a10297e Merge pull request 'Don't include port in REMOTE_ADDR' (#18) from makeworld/molly-brown:master into master
Reviewed-on: #18
2020-12-27 17:40:18 +00:00
makeworld 99ba34c2b7 Merge branch 'master' into master 2020-12-26 23:33:41 +00:00
makeworld e0e0cf7dd6 Don't include port in REMOTE_ADDR 2020-12-26 18:23:36 -05:00
Solderpunk 34e05cc0b5 Merge pull request 'Use io.Copy over ioutil.ReadFile' (#17) from makeworld/molly-brown:master into master
Reviewed-on: #17
2020-12-10 07:12:26 +00:00
makeworld c6c6e544d6 Use io.Copy over ioutil.ReadFile 2020-12-09 17:59:00 -05:00
Robert Miles 06ae7c0442 Add "AUTH_TYPE" environment variable when client cert is present
This makes it easier to detect when a client cert is available without having to look before you leap and attempt to access any of the TLS_* variables.
2020-11-28 10:07:27 +00:00
kvothe. 1c0fb0d856 Fixed a typo in the OpenBSD enableSecurityRestrictions docs. 2020-09-16 23:49:03 -04:00
kvothe. a8f59868f3 Update requirements list for OpenBSD. 2020-09-16 23:32:35 -04:00
kvothe. fb77a13088 Finished the OpenBSD pledge/unveil implementation after testing SCGI procs. 2020-09-16 23:24:41 -04:00
kvothe. 69a253f820 Tested unveiling CGI dirs and globs as executable. 2020-09-15 22:14:12 -04:00
kvothe. 03ca12d0c1 First pass at a pledge/unveil implementation for OpenBSD. 2020-09-14 22:21:05 -04:00
Solderpunk 48f9a206c0 Merge pull request 'Added more details on the OpenBSD setup and pointed molly-brown.openbsd.example to the default molly.conf.' (#12) from kvothe/molly-brown:master into master
Reviewed-on: #12
2020-08-19 18:48:24 +00:00
kvothe. d71b43f35c Added more details on the OpenBSD setup and pointed molly-brown.openbsd.example to the default molly.conf. 2020-08-02 09:41:57 -04:00
Solderpunk 02dc6a82c6 Add trailing slash to subdirectory links in directory listings. 2020-07-30 18:49:59 +02:00
Solderpunk b26fb875a7 Fix configuration option name typo in README. Thanks, acdw! Closes #11. 2020-07-26 17:35:58 +02:00
Solderpunk 62b22a9471 Mention OpenBSD support, add example init script. 2020-07-12 16:28:41 +02:00
Solderpunk 2e510328ef Fix serious bug whereby config changes made in .molly files apply everywhere and persist until server restart! 2020-07-06 19:08:03 +02:00
Solderpunk 7d8bacdc90 Log stderr from CGI processes which exit with non-zero status to the error log. Closes #7. 2020-07-06 16:13:56 +02:00
Solderpunk b9334e07a9 Fix bug with long filenames or titles. 2020-07-04 13:13:58 +02:00
Solderpunk 48aed1398d Log remote IP address when reading a request fails. 2020-07-03 11:16:07 +02:00
Solderpunk 2241302856 Order log columns more sensibly and drop port from remote addresses. 2020-07-01 23:44:59 +02:00
Solderpunk e547818455 Remove unused import. 2020-07-01 23:06:05 +02:00
Solderpunk 37e177fbe0 Move .molly file parsing function into config.go. 2020-07-01 23:05:49 +02:00
Solderpunk 3cd4a072fd More and better error logging. 2020-07-01 22:58:07 +02:00
Solderpunk f7e588dfae More and better error logging. 2020-07-01 20:15:52 +02:00
Solderpunk 821a862036 Use standard library logging facilities for error log. 2020-07-01 19:57:39 +02:00
Solderpunk 3c4c447bd3 Broader config file error handling. 2020-07-01 19:56:43 +02:00
Solderpunk 54f659c03f Add example OpenRC script, and put all init examples in a contrib directory. 2020-07-01 17:00:18 +02:00
Solderpunk 2a263e5e70 Rewrite SCGI support to use prefixes, not regexps, and provide the same SCRIPT_PATH / PATH_INFO break as CGI. 2020-07-01 16:40:51 +02:00
Solderpunk d87ecfd20f gofmt. 2020-07-01 16:19:38 +02:00