Commit Graph

91 Commits

Author SHA1 Message Date
Omar Polo 2f09adb085 readme addition 2021-01-25 14:52:19 +00:00
Omar Polo 0b00962d37 mention chroot 2021-01-25 10:36:21 +00:00
Omar Polo 31a4993a94 use gg instead of gg.py for the regression suite 2021-01-23 17:10:00 +00:00
Omar Polo 45b4aa6e57 fix local libretls example 2021-01-23 12:22:09 +00:00
Omar Polo 7f740a1440 typo 2021-01-22 17:54:37 +00:00
Omar Polo dd8cc7d3ce mention testing in readme 2021-01-22 17:28:39 +00:00
Omar Polo f980545b58 typo x 2 2021-01-21 13:16:14 +00:00
Omar Polo 04397b3293 typo 2021-01-21 13:14:55 +00:00
Omar Polo 8f0da58068 mention the configure script and how to link to a local libtls 2021-01-21 13:12:35 +00:00
Omar Polo 32befb74a9 drop mention to the static target
it works on OpenBSD but not on alpine, it requires further tweaks.
2021-01-21 09:19:13 +00:00
Omar Polo 15209ad9ed typo 2021-01-21 08:51:17 +00:00
Omar Polo 17b09e3cb7 add a dockerfile 2021-01-18 23:15:45 +00:00
Omar Polo 5f564d23e9 mention libretls 2021-01-17 13:53:08 +00:00
Omar Polo 771d8f281b build docs + install and static targets 2021-01-17 12:12:37 +00:00
Omar Polo 76fd55f437 grammar 2021-01-17 10:06:52 +00:00
Omar Polo ea58dab1a7 update readme 2021-01-17 09:42:10 +00:00
Omar Polo d939d0f09e switch to getcwd 2021-01-17 09:33:45 +00:00
Omar Polo 881a9dd9c2 split into two processes: listener and executor
this way, we can sandbox the listener with seccomp (todo) or capsicum
(already done) and still have CGI scripts.  When we want to exec, we
tell the executor what to do, the executor executes the scripts and
send the fd backt to the listener.
2021-01-16 19:41:34 +00:00
Omar Polo dafb57b8af sandbox also on FreeBSD with capsicum 2021-01-15 14:03:45 +00:00
Omar Polo 4ad11931ec update README 2021-01-15 09:35:06 +00:00
Omar Polo 4d2ec6d705 typo 2021-01-13 19:06:51 +00:00
Omar Polo b9220ca4de new README + wording in manpage 2021-01-11 12:51:25 +00:00
Omar Polo 85dff1f9c3 fix remote_user for CGI and add -6 flag to enable ipv6 2021-01-11 12:08:50 +00:00
Omar Polo ef04b55160 switch to Bjoern Hoehrmann UTF-8 decoder
It's correct, while my hacked valid_multibyte_utf8 would allow things
that aren't technically UTF8.
2021-01-09 20:32:23 +00:00
Omar Polo 00781742c5
reject %00 2020-12-26 00:37:43 +01:00
Omar Polo df6ca41da3
IRI support
This extends the URI parser so it supports full IRI (Internationalized
Resource Identifiers, RFC3987).  Some areas of it can/may be improved,
but here's a start.

Note: we assume UTF-8 encoded IRI.
2020-12-26 00:33:11 +01:00
Omar Polo 043acc97b1
mention the %2F caveat 2020-12-25 13:15:15 +01:00
Omar Polo 83000e2dd4
improve wording
"concurrently" means at the same time, which can be confusing when we
say that it's single-threaded on a single process.
2020-12-21 15:51:09 +01:00
Omar Polo d7802bb44a
logging reworked and daemonize by default
The -l option was removed: now it logs on syslog if -f (foreground) is
not passed.
2020-12-02 21:18:01 +01:00
Omar Polo 677afbd3f8
clients certs support for CGI
internally, gmid doesn’t care if the client issued a certificate, but
now we pass that information to the CGI script in some new environment
variables.
2020-12-02 15:17:19 +01:00
Omar Polo 721e232529
make port number configurable 2020-11-18 09:12:27 +01:00
Omar Polo a5d310bc0d
[cgi] added support for path parameters
enhance the CGI scripting support so that script can take path
parameters.  That is, a script at /cgi/foo is called when the request
path is /cgi/foo/bar/...

This commit also introduce some backward incompatible changes as the
default env variables set for the CGI script changed.
2020-11-10 14:07:36 +01:00
Omar Polo 92e66347ed
regen readme 2020-11-06 18:12:57 +01:00
Omar Polo 0ed5656795
documentation improvements 2020-11-06 18:11:45 +01:00
Omar Polo 72342dc960
implementing CGI – NOT READY YET!
This is a first try at implementing CGI scripting.  The idea is that,
if CGI is explicitly enabled by the user, when a user requires an
executable file instead of serving it to the client, that file will be
executed and its output fed to the client.

There are various pieces that are still lacking, the firsts that comes
to mind are:

 - performance: the handle_cgi just loops ignoring the
   WANT_POLLIN/POLLOUT and blocking if the child process hasn’t
   outputted anything.
 - we don’t parse query variable (yet)
 - we need to set more variables in the child environment
   side question: it’s better to set the variables using setenv() or
   by providing an explicit environment?
 - document what environment the CGI script will get
 - improve the horrible unveil/pledge(cgi ? …)

but now I can serve “hello-world”-tier script from gmid!
2020-11-06 13:01:31 +01:00
Omar Polo 2c3a40faf8
added option to log to a file 2020-11-06 10:58:30 +01:00
Omar Polo 20f688381a
doc: point out that we can handle multiple clients concurrently 2020-11-05 17:06:12 +01:00
Omar Polo fab952e1d7
minor documentation edits 2020-10-03 17:49:09 +02:00
Omar Polo 4984f974cd
fixed quoting in Makefile 2020-10-02 19:46:46 +02:00
Omar Polo 6980aad6d7
fix errors in manpage
man -Tlint -l gmid.1

helped a lot
2020-10-02 19:44:32 +02:00
Omar Polo 3e4749f7f9
initial commit 2020-10-02 19:39:00 +02:00