Commit Briefs

46aeda9a8b Thomas Adam

gotwebd: fix NULL deref on ENOMEM in gotweb_process_request

ok tracey@


df610f4726 Thomas Adam

gotwebd: fix memory leak introduced in d927f8c

ok tracey@


f57ea9f3db Thomas Adam

don't create signed tag objects with trailing NUL

Although Git itself did not care, the superfluous NUL at the end of the tag object was breaking GitHub's SSH signature detection. ok stsp@


75716fd6ed Thomas Adam

portable: sockets: handle sa_len/ss_len portably

In the sockaddr_storage struct, there can be a ss_len field. This is seen on some BSDs, but not Linux. Since this isn't POSIX-specific, there's no guarantee it will be available on all systems.


0b75e088e5 Thomas Adam

gotwebd: add CSP policy

ok tracey@


ddf2e5c25d Thomas Adam

gotwebd: fix for possible NULL beign passed to fcgi_printf

reported by and ok tracey@


255f402287 Thomas Adam

gotwebd: make sure to escape possibly unsafe strings

this fixes only the HTML escaping of strings, the urlencode is still missig. while here also plug a memory leak in gotweb_render_branches and drop some needless ternary operators. ok tracey@


0b3823fdda Thomas Adam

gotwebd: minor tweaks to the generated HTML

spotted by validator.w3.org: - use target="_blank" instead of `_sotd' - drop `alt' attributes in `a' tags This fixes all the errors reported; only a warning suggesting to add a `lang' attribute on the <html> tag remains.


1f6ec06842 Thomas Adam

mark functions internally used by sockets.c as static

ok tracey


c19738c9ed Thomas Adam

fix previous: store port number in host byte order, convert for struct sockaddr

With the previous patch the listen port was correct, but the debug log output was still displaying the swapped port number. Now both listen behaviour and debug log output agree.


1e135a4fe7 Thomas Adam

fix gotwebd default fcgi listen port byte-order (port 10275 -> port 9000)

ok tracey


a90e31174c Thomas Adam

gotwebd: listen on localhost only by default

ok tracey


9d7714e36f Thomas Adam

gotwebd: struct socket_conf can only use a single address, so don't use a list

ok tracey


7939347171 Thomas Adam

gotwebd: add fcgi_printf

instead of fcgi_gen_response which outputs only a fixed strings provide a printf-like fcgi_printf: it greatly simplifies the generation of the HTML pages. While here also (probably) fix some HTML errors: the output was verified with the W3C validator and it's correct (in the sense that the tags are properly closed, there are still some other things the validator complains about.) ok/encouragement baseprime@, ok jamsek Thanks for reading such a boring diff!


4b553fec9a Thomas Adam

portable: configure: fix version string

Older autotools versions need extra coaxing when running external programs.


6efd5dc99c Thomas Adam

portable: ver: fix incorrect envvar


b5c076278b Thomas Adam

fix overflow in blame callback

spotted by noticing gotwebd crashing on some blame requests. Diff from stsp@ with a fix from tracey@, I'm committing it only because he is short on time. ok stsp@


720c2b0511 Thomas Adam

gotwebd: initialize IPv4 and IPv6 sockets in the same way

ok tracey


ae46fc5c45 Thomas Adam

gotwebd: don't listen on FCGI sockets when FCGI is not enabled

ok tracey


90d63d4711 Thomas Adam

gotwebd: do not allocate server/socket list heads separately

ok millert@


62f852145b Thomas Adam

gotwebd: do not allocate address list heads separately, this is unnecessary

ok millert@


717a78d4f8 Thomas Adam

fix snprintf error handling

follow the "proper secure idiom" described in the CAVEATS section of printf(3). reminded by tb@ and millert@


406d5a24d2 Thomas Adam

convert two snprintf to strlcpy

"looks good to me" millert@


7e1f3a3d0f Thomas Adam

check for fprintf failure


b6bfeb8555 Thomas Adam

got(1): Replace 'Ar sign' with 'Cm sign'

Cm sign matches the markup used in the ssh-keygen(1) man page. Patch by Josiah Frentsos