NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PR/52375 CVS commit: [netbsd-8] src/libexec/httpd
The following reply was made to PR misc/52375; it has been noted by GNATS.
From: "Martin Husemann" <martin%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc:
Subject: PR/52375 CVS commit: [netbsd-8] src/libexec/httpd
Date: Sat, 24 Nov 2018 17:13:51 +0000
Module Name: src
Committed By: martin
Date: Sat Nov 24 17:13:51 UTC 2018
Modified Files:
src/libexec/httpd [netbsd-8]: CHANGES auth-bozo.c bozohttpd.8
bozohttpd.c bozohttpd.h cgi-bozo.c content-bozo.c daemon-bozo.c
dir-index-bozo.c main.c ssl-bozo.c tilde-luzah-bozo.c
src/libexec/httpd/lua [netbsd-8]: bozo.lua glue.c optparse.lua
src/libexec/httpd/testsuite [netbsd-8]: Makefile html_cmp t3.out t5.out
t6.out test-bigfile test-simple
Added Files:
src/libexec/httpd/testsuite [netbsd-8]: t12.in t12.out t13.in t13.out
t14.in t14.out t15.in t15.out
src/libexec/httpd/testsuite/data [netbsd-8]: .bzremap
Log Message:
Sync to HEAD (requested by mrg in ticket #1104)
libexec/httpd/testsuite/data/.bzremap up to 1.1
libexec/httpd/testsuite/t12.out up to 1.1
libexec/httpd/testsuite/t12.in up to 1.1
libexec/httpd/testsuite/t13.out up to 1.1
libexec/httpd/testsuite/t13.in up to 1.1
libexec/httpd/testsuite/t14.out up to 1.1
libexec/httpd/testsuite/t14.in up to 1.1
libexec/httpd/testsuite/t15.out up to 1.1
libexec/httpd/testsuite/t15.in up to 1.1
libexec/httpd/CHANGES up to 1.28
libexec/httpd/auth-bozo.c up to 1.22
libexec/httpd/bozohttpd.8 up to 1.74
libexec/httpd/bozohttpd.c up to 1.96
libexec/httpd/bozohttpd.h up to 1.56
libexec/httpd/cgi-bozo.c up to 1.44
libexec/httpd/content-bozo.c up to 1.16
libexec/httpd/daemon-bozo.c up to 1.19
libexec/httpd/dir-index-bozo.c up to 1.28
libexec/httpd/main.c up to 1.21
libexec/httpd/ssl-bozo.c up to 1.25
libexec/httpd/tilde-luzah-bozo.c up to 1.16
libexec/httpd/lua/bozo.lua up to 1.3
libexec/httpd/lua/glue.c up to 1.5
libexec/httpd/lua/optparse.lua up to 1.2
libexec/httpd/testsuite/Makefile up to 1.11
libexec/httpd/testsuite/html_cmp up to 1.6
libexec/httpd/testsuite/t3.out up to 1.4
libexec/httpd/testsuite/t5.out up to 1.4
libexec/httpd/testsuite/t6.out up to 1.4
libexec/httpd/testsuite/test-bigfile up to 1.5
libexec/httpd/testsuite/test-simple up to 1.5
Cosmetic changes to Lua binding in bozohttpd.
- Don't use negative indicies to read arguments of Lua functions.
- On error, return nil, "error string".
- Use ssize_t for return values from bozo_read() and bozo_write().
- Prefer lstring especially when if saves you from appending NUL and
doing len + 1 which can potentially wraparound.
- Don't mix C allocations with Lua functions marked with "m" in the Lua
manual. Those functions may throw (longjump) and leak data allocated
by C function. In one case, I use luaL_Buffer, in the other case,
I rearranged calls a bit.
fix ordering of a couple of words. from Edgar Pettijohn in PR#52375.
thanks!
s/u_int/unsigned/.
from Jan Danielsson. increases/fixes portability.
PR bin/52194: bozohttpd fails to exec scripts via the -C mechanism
sometimes with EFAULT due to not NULL terminated environment.
Document script handler issues with httpd(8).
From martin@, addressing PR 52194.
While here, use American spelling consistently and upper-case some
abbreviations.
Bump date.
fix output since protocol agnostic change went in.
XXX: i thought someone hooked this into atf already, please do :)
Add support for remapping requested paths via a .bzredirect file.
Fixes PR 52772. Ok: mrg@
Bump date
Remove trailing whitespace.
use __func__ in debug().
fix a denial of service attack against header contents, which
is now bounded at 16KiB. reported by JP.
avoid memory leak in sending multiple auth headers.
mostly mitigated by previous patch to limit total header size,
but still a real problem here.
note the changes present in bozohttpd 20181118:
o add url remap support via .bzremap file, from martin%netbsd.org@localhost
o handle redirections for any protocol, not just http:
o fix a denial of service attack against header contents, which
is now bounded at 16KiB. reported by JP.
from CHANGES:
o reduce default timeouts, and add expand timeouts to handle the
initial line, each header, and the total time spent
o add -T option to expose new timeout settings
o minor RFC fixes related to timeout handling responses
old timeouts:
60 seconds for initial request like, 60 seconds per header line,
and no whole timeout (though the recent total header size changes
do introduce one that would be about 11 hours.)
new timeouts:
30 seconds for initial request like, 10 seconds per header line,
and a total request time of 600 seconds.
the new global timeout is implemented using CLOCK_MONOTONIC, with
a fallback to CLOCK_REALTIME if monotonic time is unavailable.
reject multiple Host: headers. besides being protocol standard,
this closes one additional memory leak found by JP. add a simple
test to check this.
clean up option and usage handling some.
move some #if support into bozohttpd.h.
fix previous: have_debug was reversed.
also fix have_dynamic_content from the previous previous. re-order
the debug and dynamic content to match the same pattern as everything
else so similar problems are less likely in the future.
- move special files defines into bozohttpd.h, so we can ...
- consolidate all the special file checks into
bozo_check_special_files() so that all builds check the same
list of special files, regardless of build options.
- convert "(void)bozo_http_error(...); return -1;" into plain
"return bozo_http_error(...);"
- fix the call to bozo_check_special_files() to be used on all
input types. part of the fixes for failure to reject access
to /.htpasswd as reported by JP on tech-security.
- use warn_unused_result attribute on bozo_check_special_files(),
and fix the failures to return failure. second part of the
htpasswd access fix.
- update testsuite to use a fixed fake hostname.
call this bozohttpd 20181121.
two fixes reported by mouse:
- don't check contents of 'st' if stat(2) failed.
- round up instead of truncate. now 10000 byte files say 10kB not 9kB.
use MAP_SHARED for the bzremap file. avoids netbsd kernel complaining:
WARNING: defaulted mmap() share type to MAP_PRIVATE (pid 15478 command bozohttpd)
many clean ups:
- keep a list of special files and their human names
- remove (void) casts on bozo_http_error()
- fix a few more misuses of bozo_http_error()
- rename check_mapping() to check_remap() and perform some CSE
- switch away from ``%s'' to '%s'
- remove a bunch of #ifdef using new have_feature defines
alpha sort the option switch.
add an assert() check on array bounds.
minor style fixes. simplify bozo_match_content_map().
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.25.4.1 src/libexec/httpd/CHANGES
cvs rdiff -u -r1.18 -r1.18.8.1 src/libexec/httpd/auth-bozo.c
cvs rdiff -u -r1.65 -r1.65.4.1 src/libexec/httpd/bozohttpd.8
cvs rdiff -u -r1.86.4.1 -r1.86.4.2 src/libexec/httpd/bozohttpd.c
cvs rdiff -u -r1.47 -r1.47.4.1 src/libexec/httpd/bozohttpd.h
cvs rdiff -u -r1.37.4.1 -r1.37.4.2 src/libexec/httpd/cgi-bozo.c
cvs rdiff -u -r1.14 -r1.14.6.1 src/libexec/httpd/content-bozo.c
cvs rdiff -u -r1.17 -r1.17.8.1 src/libexec/httpd/daemon-bozo.c
cvs rdiff -u -r1.25 -r1.25.8.1 src/libexec/httpd/dir-index-bozo.c
cvs rdiff -u -r1.16 -r1.16.6.1 src/libexec/httpd/main.c
cvs rdiff -u -r1.22 -r1.22.8.1 src/libexec/httpd/ssl-bozo.c
cvs rdiff -u -r1.14 -r1.14.8.1 src/libexec/httpd/tilde-luzah-bozo.c
cvs rdiff -u -r1.2 -r1.2.8.1 src/libexec/httpd/lua/bozo.lua \
src/libexec/httpd/lua/glue.c
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.44.1 src/libexec/httpd/lua/optparse.lua
cvs rdiff -u -r1.7 -r1.7.4.1 src/libexec/httpd/testsuite/Makefile
cvs rdiff -u -r1.5 -r1.5.6.1 src/libexec/httpd/testsuite/html_cmp
cvs rdiff -u -r0 -r1.1.4.2 src/libexec/httpd/testsuite/t12.in \
src/libexec/httpd/testsuite/t12.out src/libexec/httpd/testsuite/t13.in \
src/libexec/httpd/testsuite/t13.out
cvs rdiff -u -r0 -r1.1.2.2 src/libexec/httpd/testsuite/t14.in \
src/libexec/httpd/testsuite/t14.out src/libexec/httpd/testsuite/t15.in \
src/libexec/httpd/testsuite/t15.out
cvs rdiff -u -r1.3 -r1.3.38.1 src/libexec/httpd/testsuite/t3.out \
src/libexec/httpd/testsuite/t5.out src/libexec/httpd/testsuite/t6.out
cvs rdiff -u -r1.4 -r1.4.4.1 src/libexec/httpd/testsuite/test-bigfile
cvs rdiff -u -r1.4 -r1.4.10.1 src/libexec/httpd/testsuite/test-simple
cvs rdiff -u -r0 -r1.1.4.2 src/libexec/httpd/testsuite/data/.bzremap
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index