Commit Graph

941 Commits

Author SHA1 Message Date
Omar Polo 40c79b49f2 gmid 1.8.6 2022-12-02 12:17:28 +00:00
Omar Polo af3a75b4d0 add tests and compat for setresuid and setresgid
backport of bd8683d0fd
2022-12-02 11:57:37 +00:00
Omar Polo 4fbd4dcc6e define GEMINI_SEARCH_STRING for CGI scripts too
it's redundant since gmid already fills the script argv with the words
extracted from the search string, but 2.0 won't have cgi support and not
all fastcgi <-> cgi wrappers follow RFC3875 § 4.4.  This can help in
preparing scripts for a future when they'll be run under for e.g. slowcgi(8).
2022-11-29 23:24:21 +00:00
Omar Polo a057e3a49c add an implicit fastcgi parameter: GEMINI_SEARCH_STRING
backport of 97b306cbee

it’s the QUERY_STRING decoded if it’s a search-string (i.e. not a
key-value pair.)  It’s useful for scripts to avoid percent-decoding
the querystring in the most common case of a query, because in Gemini
querystrings key-value paired are not common.

Idea from a discussion with Allen Sobot.
2022-11-29 23:08:23 +00:00
Omar Polo fb6a629e69 correction: QUERY_STRING is *not* urldecoded.
backport of 77718c121f

RFC3875 § 4.1.7 states that "the QUERY_STRING variable contains a
URL-encoded search or parameter string".
2022-11-29 23:07:08 +00:00
Omar Polo dfa8b23f08 return after FCGI_END_REQUEST
backport 17493a486c

this fixes a possible crash if `client_write' closes the connection,
because client_close can end up freeing the fastcgi bufferevent while
we're looping.

We don't support fastcgi multiplexing, so once we get an END_REQUEST
there's nothing more to do.

Prodded into looking here after a bug report from Allen Sobot, thanks!
2022-11-29 23:06:39 +00:00
Omar Polo c197ad99a3 when switching user also set the groups
backport of 872a717687
2022-11-29 23:05:28 +00:00
Omar Polo 52772181b5 always cast is*() arguments to unsigned char
backport of 6130e0e and 06035a0
2022-11-29 23:04:30 +00:00
Omar Polo 4107583e32 gmid 1.8.5 2022-10-31 22:46:59 +00:00
Omar Polo 36213d7376 disable test_unknown_host temporarly
breaks on some distro and needs further investigations; it's not that
interesting fortunately.
2022-10-31 22:46:59 +00:00
Omar Polo 2d7a479e73 add memmem compat 2022-10-31 22:46:59 +00:00
Omar Polo a936066319 rework `make dist' 2022-10-31 22:30:55 +00:00
Omar Polo ee32ee80db remove -v from gg
undocumented flag to dump to stdout the request before doing it.  Not
useful, it's debugging leftover.
2022-10-31 18:29:28 +00:00
Omar Polo f25fa4a951 don't count twice the failing tests on gmid crashes 2022-10-31 18:27:33 +00:00
nytpu 339a27c63e always send custom list of fcgi parameters
The code in fcgi_req to send the custom params set in the config file was
placed inside the conditional for `tls_peer_cert_provided`, so the custom
parameters would not be sent if a client certificate is not provided.
2022-10-31 18:23:13 +00:00
Omar Polo 5df699d1ab count ran/failed tests number 2022-08-29 16:44:07 +00:00
Omar Polo 39ad4b8d7f sync 2022-07-07 18:19:34 +00:00
Omar Polo bd2eb09520 call tzset(3) to fix times in logs
reported by Karl Jeacle, thanks!
2022-07-07 18:15:06 +00:00
Omar Polo 93124fce99 mention Anna' patch too 2022-07-07 08:57:28 +00:00
Omar Polo 9ac625870e mention the removal of the rc file 2022-07-07 08:56:23 +00:00
Omar Polo ddd291dd7c mention the 1.8.4 release 2022-07-07 08:55:32 +00:00
Omar Polo de8dc03c4d sync 2022-07-07 08:54:26 +00:00
Omar Polo be97b57fc8 don't set d_reclen
It's not actually used and doesn't seem to be available on DragonflyBSD
(at least) judging from the patching in dports:

f66bf875f7
2022-07-07 08:54:26 +00:00
Omar Polo 2573332d7f don't hardcode urls; use TREE 'macro' 2022-07-07 08:54:26 +00:00
Anna “CyberTailor” 07fbbf0610 include contrib/ in dist 2022-07-07 10:38:49 +02:00
Omar Polo 3bba4fc55f remove the OpenBSD' rc file
now that gmid is packaged on OpenBSD the rc file is maintained in the
ports tree.
2022-07-04 19:22:08 +00:00
Omar Polo f759119d2f bump version 2022-07-04 19:18:39 +00:00
Omar Polo f3f4543119 don't hardcode version numbers 2022-07-04 19:18:30 +00:00
Omar Polo b48eb0db52 add missing manpage for gg 2022-07-04 15:04:46 +00:00
Omar Polo 1f6de7491c changes for 1.8.4 2022-07-04 14:51:39 +00:00
Omar Polo 1670b5f3ae mention the codeberg mirror too 2022-07-04 14:48:18 +00:00
Omar Polo c6fb44edd8 remove mentions of the precompiled binaries 2022-07-04 14:48:10 +00:00
Omar Polo d45d5306e3 fix test_auto_index 2022-07-04 14:33:45 +00:00
Omar Polo 0d823f229d sync 2022-07-04 14:31:20 +00:00
Omar Polo 543f4a66fe add a trailing / for dirs in the directory index. 2022-07-04 14:31:17 +00:00
Omar Polo 5734723f92 typo 2022-07-04 14:09:52 +00:00
Omar Polo 870063d344 include Makefile.depend too 2022-07-04 13:53:51 +00:00
Omar Polo 7fc52d5104 add an example configure.local based on mandoc-portable' one 2022-07-04 13:44:53 +00:00
Omar Polo 96e3c01314 refactor the makefile / configure
steal more (good) stuff from mandoc-portable :)
2022-07-04 13:44:38 +00:00
Omar Polo 225686d7fd fix getprogname shim
HAVE_PROGRAM_INVOCATION_SHORT_NAME is always defined; look at wether
it's zero or not.
2022-07-04 13:43:27 +00:00
Omar Polo a3ebbccb8e the install target ought to depend on gg too 2022-07-04 09:52:44 +00:00
Omar Polo a555e0d67b copyright years 2022-07-04 09:48:39 +00:00
Omar Polo cb2b85512c add proper copyrights
was a mistake on my part and a leftover from the first iterations.
Initially I only stole a few bits, that's why the comment but not the
copyright, but then i threwed out and restarted using oconfigure.
Then the configure script has its own independent changes, but need to
give attribution nevertheless.
2022-07-04 09:43:51 +00:00
Omar Polo 617ae38546 add some more regress for the encodings 2022-07-04 09:36:55 +00:00
Omar Polo 475205fa0f check for the expected page in test_auto_index
not just the number of lines, check the full page!
2022-07-04 09:36:31 +00:00
Omar Polo ddd3c5529f sync 2022-07-04 09:32:02 +00:00
Omar Polo f2f8eb35c8 encode file names in the directory index
Spotted the hard way by cage
2022-07-04 09:31:36 +00:00
Omar Polo 3bd4a6dea0 log when it fails to open a file because of permissions 2022-07-04 08:25:15 +00:00
Omar Polo df40c96931 changelog 2022-07-04 08:15:45 +00:00
Omar Polo 5e41063f1b bugfix: allow @ and : in paths
gmid would disallow the '@' and ':' characters in paths (unless
percent-encoded.)  Issue reported by freezr.
2022-07-04 08:15:39 +00:00