Commit Graph

2935 Commits

Author SHA1 Message Date
Glenn Strauss eb4f953396 [build] avoid accept_filter_arg compiler warning
avoid compiler warning for struct accept_filter_arg af_name strncpy()
2020-08-02 12:55:18 -04:00
Glenn Strauss f358f04bdc [build] SCons build mod_deflate w/ libm for brotli 2020-08-02 12:32:37 -04:00
Glenn Strauss 4663564c8a [mod_authn_dbi,mod_authn_mysql] fix coverity issue 2020-08-02 09:00:17 -04:00
Glenn Strauss 7bc7082d32 [mod_extforward] attempt to quiet Coverity warning 2020-08-02 09:00:17 -04:00
Glenn Strauss 4a1960958a [core] add some missing standard includes 2020-08-02 07:47:42 -04:00
Glenn Strauss b2d7635801 [mod_webdav] fix inadvertent string truncation
(bug on master branch; never released)
2020-08-02 07:47:42 -04:00
Glenn Strauss 0fb391c096 [core] http_header_remove_token() 2020-08-02 07:47:42 -04:00
Glenn Strauss d44a26bfa3 [tests] test_base64.c clear buf vs reset
(can be slightly faster to clear buffer than to reset buffer)
2020-08-02 07:47:42 -04:00
Glenn Strauss f7919c1ae3 [mod_proxy] send HTTP/1.1 requests to backends
For prior behavior (HTTP/1.0 requests to backend), force HTTP/1.0 with:
  server.feature-flags = ("proxy.force-http10" => "enable")
2020-08-02 07:47:42 -04:00
Glenn Strauss c3073b4da6 [core] stricter parsing of POST chunked block hdr 2020-08-02 07:47:42 -04:00
Glenn Strauss 9ca668c870 [mod_fastcgi] decode Transfer-Encoding: chunked
decode Transfer-Encoding: chunked from mod_fastcgi backend
2020-08-02 07:47:42 -04:00
Glenn Strauss 7420526ddb [core] decode Transfer-Encoding: chunked from gw
decode Transfer-Encoding: chunked from gw (gateway backends)

Transfer-Encoding: chunked is a hop-by-hop header.

Handling chunked encoding remove a hurdle for mod_proxy to send HTTP/1.1
requests to backends and be able to handle HTTP/1.1 responses.

Other backends ought not to send Transfer-Encoding: chunked, but in
practice, some implementations do.
2020-08-02 07:47:42 -04:00
Glenn Strauss dbd438cca0 [mod_openssl] read secret data w/ BIO_new_mem_buf
Using BIO_new_mem_buf() allows lighttpd to control file reads and
securely wiping memory, avoiding the use of BIO_s_file(), which
employs stdio and BIO internal copying without securely wiping memory.

BIO_new_mem_buf() is also much more performant than BIO_s_file()
or BIO_new_fd() without a buffering BIO, which might make many
syscalls reading a single character at a time.

BIO_new_mem_buf() appears to be supported by older OpenSSL versions
as well as by numerous OpenSSL-compatible APIs, e.g. in BoringSSL,
LibreSSL, WolfSSL
2020-08-02 07:47:42 -04:00
Glenn Strauss 4b755d2b03 [mod_deflate] quicker check for Content-Encoding
The response is not a candidate for mod_deflate if
Content-Encoding was already set by something else.
2020-08-02 07:47:42 -04:00
Glenn Strauss 496dc6d9c5 [core] detect and reject TLS connect to cleartext
detect and reject TLS connection to cleartext listening port
(alternative to failing to receive HTTP header and waiting to time out)
2020-08-02 07:47:42 -04:00
Glenn Strauss 87428818a1 [mod_nss] func renames for consistency
mod_nss was written using mod_mbedtls and mod_gnutls as templates,
but some code was accidentally committed with those other modules'
naming.
2020-08-02 07:47:41 -04:00
Glenn Strauss 33c8cf41db [multiple] rename connection_reset hook to request
rename connection_reset to handle_request_reset
2020-08-02 07:47:41 -04:00
Glenn Strauss bb6a5d7821 [core] separate funcs to reset (request_st *)
request_init(), request_free(), request_reset() separate from (and
called by) connection_init(), connection_free(), connection_reset()
2020-08-02 07:47:41 -04:00
Glenn Strauss 164f7600b7 [multiple] con hooks store ctx in con->plugin_ctx
modules with connection level hooks now store ctx in con->plugin_ctx
2020-08-02 07:47:41 -04:00
Glenn Strauss fea5bdc873 [core] con layer plugin_ctx separate from request 2020-08-02 07:47:41 -04:00
Glenn Strauss 5f7bf472c7 [core] server.feature-flags extensible config
server.feature-flags = ("server.xxxx" => "enable")
2020-08-02 07:46:27 -04:00
Glenn Strauss bc5d4b3492 [mod_compress] remove mod_compress 2020-08-02 06:46:22 -04:00
Glenn Strauss 8dd33a72dd [mod_deflate] mod_deflate subsumes mod_compress
translate config server.modules "mod_compress" to "mod_deflate"
accept compress.* directives, but issue DEPRECATED warning trace

mod_deflate differences from mod_compress:
- mod_compress compress.filetype was exact match; deflate.mimetypes is
  prefix match (behavior change might compress longer mimetype matches,
  which are likely of similar type and compressability)
- mod_compress always sent entire (compressed) file for Range request
  mod_deflate will stream compress range result (not stored in cache)
- mod_compress would short-circuit request with 403 Forbidden error
  if request file did not exist (stat() failed) (This behavior was
  unfriendly to other handlers)
- mod_compress compress.cache-dir layout differs from deflate.cache-dir
  layout; file cache should be cleared (or renamed) when migrating from
  mod_compress to mod_deflate
- mod_deflate does not issue Vary: Accept-Encoding if request does not
  contain Accept-Encoding.  The identity response can be cache by
  proxies and served to clients.  Historically, some proxies disabled
  caching if any Vary: response was seen.  If the Vary header is
  desirable, mod_deflate code which checks for Accept-Encoding and
  compression type can be moved down a few lines to be below the
  setting of the Vary response header.
2020-08-02 06:46:22 -04:00
Glenn Strauss be6da785c5 [mod_deflate] deflate.cache-dir compressed cache
(achieves feature parity with mod_compress)
2020-08-02 06:46:22 -04:00
Glenn Strauss 5b15c1f449 [mod_deflate] propagate errs from internal funcs
also, pass one less arg to internal funcs
2020-08-02 06:46:22 -04:00
Glenn Strauss b2fe37f0a9 [mod_deflate] fix typo in config option
(typo on master branch; never released)
2020-08-02 06:46:22 -04:00
Glenn Strauss 8d5e237c60 [mod_deflate] Brotli support
configuration option: ./configure --with-brotli
2020-08-02 06:46:22 -04:00
Glenn Strauss be8047d82f [build] build fixes for AIX
x-ref:
  "Compile on AIX conflicting types for 'etag_create'"
  https://redmine.lighttpd.net/boards/2/topics/9242
2020-07-21 12:08:27 -04:00
Glenn Strauss 1a516b4c4c [mod_vhostdb_dbi] allow strings and ints in config
e.g. allow "port" value to be a string or integer instead of requiring
     port be a string
2020-07-16 00:30:20 -04:00
Glenn Strauss 3dca923591 [mod_authn_mysql,file] use crypt() to save stack
use crypt() instead of crypt_r() to save stack space,
as struct crypt_data might be very large.

While crypt() is not thread-safe, lighttpd is single-threaded
2020-07-16 00:29:43 -04:00
Glenn Strauss fed2ecae19 [mod_authn_dbi] authn backend employing DBI 2020-07-16 00:29:43 -04:00
Glenn Strauss dba4a328c2 [core] Nettle assert()s if buffer len > digest sz 2020-07-13 17:39:30 -04:00
Glenn Strauss c3dd167dd9 [mod_openssl] fix build warnings on MacOS X
need undef OPENSSL_NO_STDIO for a few funcs which access filesystem
2020-07-13 17:39:30 -04:00
Glenn Strauss 33ae830291 [mod_auth] accept "nonce-secret" & "nonce_secret" 2020-07-13 17:39:30 -04:00
Glenn Strauss 563fe5f013 [mod_authn_ldap,mod_vhostdb_ldap] add timeout opt (#2805)
auth.backend.ldap.timeout = "2000000"    # quoted-string; microseconds
vhostdb.ldap += ("timeout" => "2000000") # quoted-string; microseconds

Default is 2000000 microseconds (2 secs)

These values are converted to struct timeval and passed to
  ldap_set_option(ld, LDAP_OPT_NETWORK_TIMEOUT, );
  ldap_set_option(ld, LDAP_OPT_TIMEOUT, ...);
if those LDAP_OPT_* values are available (both are OpenLDAP-specific).

x-ref:
  "mod_auth caching"
  https://redmine.lighttpd.net/issues/2805
2020-07-13 17:39:30 -04:00
Glenn Strauss e11514b086 [mod_auth,mod_vhostdb] add caching option (fixes #2805)
auth.cache    = ("max-age" => "600")
vhostdb.cache = ("max-age" => "600")

If specified with an empty array, default max-age is 600 secs (10 mins)
auth.cache    = ()
vhostdb.cache = ()

(Note: cache expiration occurs every 8 seconds, so maximum cache time
 might be up to max-age + 8 seconds)

x-ref:
  "mod_auth caching"
  https://redmine.lighttpd.net/issues/2805
2020-07-13 17:39:27 -04:00
Rosen Penev fd2a12d636 [meson] add missing libmaxminddb section
Fixes the following error when building with -Dwith_maxminddb=true:

meson.build:916:1: ERROR: Unknown variable "libmaxminddb".

A full log can be found at meson-logs/meson-log.txt

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-07-11 01:07:19 -04:00
Rosen Penev 04a7d98cb9 [meson] fix libmariadb dependency
libmariadb is what should be used as only the library portion is used.

Fixes compilation under OpenWrt.

Note that mariadb.pc is a superset that links to libmariadb.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-07-11 01:07:16 -04:00
Glenn Strauss 3057b63ea2 [multiple] address coverity warnings 2020-07-10 22:18:26 -04:00
Glenn Strauss 3119d938cb [mod_webdav] build fix: ifdef live_properties 2020-07-10 21:54:27 -04:00
Glenn Strauss 50ddc8108b [mod_webdav] update rc for PROPFIND allprop
(rc currently ignored in case of PROPFIND allprop)
2020-07-10 21:36:32 -04:00
Glenn Strauss 10b7aedcdb [mod_webdav] fix theoretical NULL dereference
fix theoretical NULL dereference identified by Coverity Scan

possible for PROPFIND with specific atypical choices in lighttpd.conf:
- possible for getcontenttype if no content type matches resource
  and no default type configured in lighttpd.conf
- possible for getetag if etag disabled in lighttpd.conf
2020-07-10 21:34:28 -04:00
Glenn Strauss 2781a3be6d [multiple] address coverity warnings 2020-07-10 21:34:28 -04:00
Glenn Strauss ea58cc6f3f [core] store fd in srv->stdin_fd during setup
(pedantic; no impact)

upon error, server will exit, so the impact of momentarily leaking fd
has no impact.  This commit holds the fd in srv->stdin_fd to address
Coverity warning about leaking fd when using server.bind = "/dev/stdin"
2020-07-10 19:30:24 -04:00
Glenn Strauss 6886e78bca [core] remove unused mbedtls_enabled flag
(initially used during development of mod_mbedtls, but no longer used)
2020-07-10 19:28:12 -04:00
Glenn Strauss 2f5fc68b59 [build] fix typo in src/Makefile.am EXTRA_DIST 2020-07-10 19:27:42 -04:00
Glenn Strauss be0d11414e [cmake] update deps for src/t/test_* 2020-07-10 03:20:37 -04:00
Glenn Strauss 52fb78459f [cmake] update deps for src/t/test_* 2020-07-10 03:13:08 -04:00
Glenn Strauss f85d1f9070 [core] splaytree_djbhash() in splaytree.h (reuse)
rename and move hashme() from stat_cache.c to splaytree_djbhash() in
splaytree.h for code reuse
2020-07-10 00:02:48 -04:00
Glenn Strauss 0d4c8edd8f [mod_mysql_vhost] deprecated; use mod_vhostdb_mysql
add warning at server startup when mod_mysql_vhost is loaded

mod_vhostdb_mysql subsumes mod_mysql_vhost.  Individual mod_mysql_vhost
directives map one-to-one to keywords in vhostdb.mysql = (...) directive
2020-07-09 23:45:06 -04:00
Glenn Strauss d334eaf1ee [core] uint32_t is plenty large for path names 2020-07-09 23:45:04 -04:00
Glenn Strauss 28f1867c11 quiet clang analyzer scan-build warnings
(expansion of buffer_string_lenth() inline function and CONST_BUF_LEN()
 macro, which always check for NULL, appears to cause the analyzer to
 believe that a pointer might be NULL in cases where it otherwise can
 not be NULL)

x-ref:
  http://clang-analyzer.llvm.org/faq.html
2020-07-08 22:51:32 -04:00
Glenn Strauss 98a224a4a2 [mod_openssl] prefer some WolfSSL native APIs
Prefer some WolfSSL native APIs when building with WolfSSL.

However, some functionality in WolfSSL is available only through the
WolfSSL compatibility layer for OpenSSL, so the effort to create a
native mod_wolfssl halted here.
2020-07-08 22:51:32 -04:00
Glenn Strauss ed088f5728 [core] error if s->socket_perms chmod() fails 2020-07-08 22:51:32 -04:00
Glenn Strauss 0ad57da55b [mod_openssl,mbedtls,gnutls,nss] fdevent_load_file
employ fdevent_load_file() to load CRL, X509 cert, and private key files
into memory
2020-07-08 22:51:32 -04:00
Glenn Strauss cc04468762 [core] fdevent_load_file() shared code 2020-07-08 22:51:32 -04:00
Glenn Strauss e00deb5578 [mod_nss] NSS option for TLS (fixes #1218)
(experimental)

WARNING: EXPERIMENTAL code sketch; mod_nss is INCOMPLETE and UNTESTED

mod_nss supports most ssl.* config options supported by mod_openssl

x-ref:
  "alternate ssl backend"
  https://redmine.lighttpd.net/issues/1218
2020-07-08 22:51:32 -04:00
Glenn Strauss 8a1ddce0c2 [mod_openssl] default to set MinProtocol TLSv1.2
(behavior change)

TLSv1.0 and TLSv1.1 are deprecated and no longer supported by major
browsers.

MinProtocol is configurable, if required:
e.g. ssl.openssl.ssl-conf-cmd = ("MinProtocol" => "TLSv1.1")

x-ref:
  https://news.netcraft.com/archives/2020/03/03/browsers-on-track-to-block-850000-tls-1-0-sites.html
2020-07-08 22:51:32 -04:00
Glenn Strauss 8422fa4573 [mod_gnutls] detect certs marked OCSP Must-Staple 2020-07-08 22:51:32 -04:00
Glenn Strauss f56c8e58e4 [mod_openssl] detect certs marked OCSP Must-Staple 2020-07-08 22:51:32 -04:00
Glenn Strauss 1c5def49f6 [mod_webdav] webdav.opts "propfind-depth-infinity"
webdav.opts = ("propfind-depth-infinity" => "enable")
to allow PROPFIND with Depth: infinity   (default "disable")
2020-07-08 22:51:32 -04:00
Glenn Strauss 6bf0b57787 [mod_webdav] unsafe-propfind-follow-symlink option
webdav.opts = ("unsafe-propfind-follow-symlink" => "enable")

This option is unsafe and unsupported.  This option enables non-standard
behavior.  If it works for you, great.  If it does not work for you,
then too bad.

WebDAV resource and collection concepts do not have an equivalence
to unix symlinks.  If "unsafe-propfind-follow-symlink" is "enable",
then lighttpd mod_webdav PROPFIND handling will follow symlinks
if and only if webdav.is_readonly = "enable" is also set.

Allowing symlinks is unsafe in the general case.  Using WebDAV methods
to MOVE a relative symlink does not update the symlink relative target.
LOCK is on the resource (e.g. a symlink), not the target of the symlink.
COPY replaces the resource (e.g. a symlink), not the target of the
symlink.  There are only a few examples of possibly many more reasons
why using symlinks in a WebDAV-writable collection is unsafe.
2020-07-08 22:51:32 -04:00
Glenn Strauss 1a02cd7e33 [mod_webdav] limit webdav_propfind_dir() recursion 2020-07-08 22:51:32 -04:00
Glenn Strauss 965c47c85a [mod_webdav] store webdav.opts as bitflags 2020-07-08 22:51:31 -04:00
Glenn Strauss a479d08b7c [mod_extforward] config warning for module order
expand config warning for module load order to include other TLS modules
2020-07-08 22:51:31 -04:00
Glenn Strauss c0796ee1dd [mod_gnutls] OCSP stapling (#2469) 2020-07-08 22:51:31 -04:00
Glenn Strauss 12e5e745b0 [mod_gnutls] option to override GnuTLS priority
provide option to override GnuTLS priority string
ssl.openssl.ssl-conf-cmd = ("gnutls-override" => "...")
will *entirely* replace the priority string constructed by mod_gnutls.
Admin is responsible to ensure that the override is complete.

debugging:
A non-zero value for debug.log-ssl-noise = x *in the global scope*
will cause mod_gnutls to print the GnuTLS priority string to the
error log at startup.  debug.log-ssl-noise = 0 in $SERVER["socket"]
scopes can then be used to disable runtime ssl log noise, or
debug.log-ssl-noise can be removed from the global scope after debugging
2020-07-08 22:51:31 -04:00
Glenn Strauss 5bbf0d34ca [mod_openssl] compat with BoringSSL 2020-07-08 22:51:31 -04:00
Glenn Strauss b2b6257c7a [mod_openssl] OCSP stapling (fixes #2469)
Define ssl.stapling-file in lighttpd.conf in same scope as ssl.pemfile

x-ref:
  "OCSP Stapling"
  https://redmine.lighttpd.net/issues/2469
2020-07-08 22:51:31 -04:00
Glenn Strauss 60ddaf26c4 [mod_openssl] basic SSL_CONF_cmd for alt TLS libs
provide *basic* (limited) parsing of ssl.openssl.ssl-conf-cmd
for BoringSSL, LibreSSL, WolfSSL
2020-07-08 22:51:31 -04:00
Glenn Strauss 1ba36fda93 [mod_openssl] move SSL_CTX curve conf to new func 2020-07-08 22:51:31 -04:00
Glenn Strauss 3fbedbced2 [mod_openssl] set SSL_OP_PRIORITIZE_CHACHA
set SSL_OP_PRIORITIZE_CHACHA, if available, when
  ssl.honor-cipher-order = "enable"
2020-07-08 22:51:31 -04:00
Glenn Strauss 7d9052c059 [mod_openssl] compat with WolfSSL 2020-07-08 22:51:31 -04:00
Glenn Strauss b4036938de [mod_openssl] compat with LibreSSL 2020-07-08 22:51:31 -04:00
Glenn Strauss c93ecb32a5 [mod_openssl] disable session cache; prefer ticket
reduce memory usage and overhead

many TLSv1.2 implementations support TLSv1.2 session ticket extension
2020-07-08 22:51:31 -04:00
Glenn Strauss 83fb1aed6f [mod_gnutls] ssl.stek-file to specify encrypt key
difference from mod_openssl:

Admin should schedule an independent job to periodically
generate a new STEK before prior STEK lifetime expires.
Only one STEK is active at a time in mod_gnutls.

(more details in prior commit message for mod_openssl)
2020-07-08 22:51:31 -04:00
Glenn Strauss 3e2e8e6d29 [mod_mbedtls] ssl.stek-file to specify encrypt key
difference from mod_openssl:

Admin should schedule an independent job to periodically
generate a new STEK up to 2 times during key lifetime
(mbedtls internals store up to 2 keys)

(more details in prior commit message for mod_openssl)
2020-07-08 22:51:31 -04:00
Glenn Strauss 32a2145f67 [mod_openssl] ssl.stek-file to specify encrypt key
ssl.stek-file to specify session ticket encryption key (STEK)
If ssl.stek-file is specified, it overrides builtin STEK rotation.
STEK file is checked for changes (stat()) once every 64 seconds.

STEK file should be stored in non-persistent storage,
  e.g. /dev/shm/lighttpd/stek-file  (in memory)
with appropriate permissions set to keep stek-file from being
read by other users.  Where possible, systems should also be
configured without swap.

Admin should schedule an independent job to periodically
generate a new STEK up to 3 times during key lifetime
(lighttpd stores up to 3 keys)

format of binary file is:
   4-byte - format version (always 0; for use if format changes)
   4-byte - activation timestamp
   4-byte - expiration timestamp
  16-byte - session ticket key name
  32-byte - session ticket HMAC encrpytion key
  32-byte - session ticket AES encrpytion key

STEK file can be created with a command such as:
  dd if=/dev/random bs=1 count=80 status=none | \
    perl -e 'print pack("iii",0,time()+300,time()+86400),<>' \
    > STEK-file.$$ && mv STEK-file.$$ STEK-file

The above delays activation time by 5 mins (+300 sec) to allow file to
be propagated to other machines.  (admin must handle this independently)
If STEK generation is performed immediately prior to starting lighttpd,
admin should activate keys immediately (without +300).
2020-07-08 22:51:31 -04:00
Glenn Strauss 953fa4ba4d [mod_openssl] rotate session ticket encryption key
server ticket encryption key (STEK) rotation occurs every 28800 seconds
(8 hours) and upon lighttpd server restart.  While lighttpd is running,
(3) encryption keys are preserved, so tickets expire after 1 day.

If using lighttpd with multiple lighttpd workers, then restarting
lighttpd keeps the STEK in sync between lighttpd workers, though
restarting lighttpd three times a day might not be palatable.
Work is in progress to allow admin to supply new encryption keys.
2020-07-08 22:51:31 -04:00
Glenn Strauss 6d62a498a2 [core] more precise check for request stream flags 2020-07-08 22:51:31 -04:00
Glenn Strauss 7b9230ee51 [core] safe memset calls memset() through volatile
safe_memclear() calls memset() through volatile func ptr
2020-07-08 22:51:31 -04:00
Glenn Strauss 6f2dcc58cd [core] SecureZeroMemory() on _WIN32 2020-07-08 22:51:31 -04:00
Glenn Strauss 10c65e88f7 [mod_openssl] update default DH params
update default DH params to use RFC 7919 FFDHE2048 2048-bit group
if ssl.dh-file is not specified
2020-07-08 22:51:31 -04:00
Glenn Strauss 27dbac34a8 [mod_openssl] use openssl feature define for ALPN
use #ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
rather than checking OPENSSL_VERSION_NUMBER >= 0x10002000 (1.0.2)
2020-07-08 22:51:31 -04:00
Glenn Strauss bdb3040f14 [mod_openssl] use SSL_OP_NO_RENEGOTIATION if avail
use [mod_openssl] SSL_OP_NO_RENEGOTIATION if available
(openssl 1.1.0 and later)
2020-07-08 22:51:31 -04:00
Glenn Strauss 3403382261 [mod_openssl] issue warning for deprecated options 2020-07-08 22:51:31 -04:00
Glenn Strauss d605c83a73 [mod_openssl] enable read-ahead, if set, after SNI
note: not disabling if enabled; extra blocks may already have been read
2020-07-08 22:51:31 -04:00
Glenn Strauss 1fc8a3e1f2 [core] sys-crypto-md.h w/ inline message digest fn
sys-crypto-md.h w/ inline message digest functions; shared code
2020-07-08 22:51:31 -04:00
Glenn Strauss c18f442a63 [multiple] add summaries to top of some modules 2020-07-08 22:51:31 -04:00
Glenn Strauss 10dbe38a92 [core] stricter parse of numerical digits
stricter parse of numerical digits for http status code, port num,
and a few other places.  (stricter parse than that of strtol())

content ranges are still parsed more loosely at points of use
2020-07-08 22:51:31 -04:00
Glenn Strauss 6876c16be0 [core] RFC-strict parse of Content-Length
augment simple strtoll() which allowed number to begin with '+'

This is not exploitable for HTTP Request Smuggling since lighttpd
mod_proxy sends "Connection: close" to backends, and other CGI-based
backends reconstitute CONTENT_LENGTH in the environment without '+'.

(thx Amit Klein, Safebreach)
2020-07-08 22:51:31 -04:00
Glenn Strauss acff179322 [mod_openssl] set chains from callback in 1.0.2+ (#2842)
mod_openssl leverages cert callback in openssl 1.0.2 and later
(SSL_CTX_set_cert_cb())

server certificate chain
  is now set in the cert callback

verify_store (for client certificate verification) (ssl.ca-file)
  is now set in the cert callback

more carefully load sensitive files and clear temporary storage
  (with openssl 1.1.1 and later)

x-ref:
  "Lighttpd Returns Wrong Cert In Multi-cert Set-up"
  https://redmine.lighttpd.net/issues/2842
2020-07-08 22:51:31 -04:00
Glenn Strauss 01b1f16b3f [mod_openssl] set cert from callback in 1.0.2+ (fixes #2842)
set server certificate from callback in openssl 1.0.2 and later
(SSL_CTX_set_cert_cb())

For existing versions of lighttpd, certificate selection influenced by
ssl.cipher-list which can be used to set server cipher order preference
(along with ssl.honor-cipher-order = "enable", which is the default)

x-ref:
  "Lighttpd Returns Wrong Cert In Multi-cert Set-up"
  https://redmine.lighttpd.net/issues/2842
  "lighttpd uses wrong pem-file"
  https://redmine.lighttpd.net/issues/3009
2020-07-08 22:51:31 -04:00
Glenn Strauss 2a5b7c648a [mod_openssl] rotate session ticket encryption key
server ticket encryption key (STEK) rotation occurs every 86400 seconds
and upon lighttpd server restart.  If using lighttpd with multiple
lighttpd workers, then restarting lighttpd keeps the STEK in sync
between lighttpd workers.
2020-07-08 22:51:31 -04:00
Glenn Strauss bf4054f8ec [mod_gnutls] GnuTLS option for TLS (fixes #109)
(experimental)

mod_gnutls supports most ssl.* config options supported by mod_openssl

x-ref:
  "GnuTLS support for the mod_ssl"
  https://redmine.lighttpd.net/issues/109
2020-07-08 22:51:31 -04:00
Glenn Strauss 68d626fa9f [mod_openssl] SSL_R_UNEXPECTED_EOF_WHILE_READING
report SSL_R_UNEXPECTED_EOF_WHILE_READING if debug.log-ssl-noise enabled

SSL_R_UNEXPECTED_EOF_WHILE_READING
added in openssl 1.1.1e and reverted in 1.1.1f, but kept in 3.0 branch
2020-07-08 22:51:31 -04:00
Glenn Strauss b33b6f9121 [mod_openssl] do not log ECONNRESET unless debug
do not log ECONNRESET to errorlog unless debug.log-ssl-noise = "enable"
2020-07-08 22:51:31 -04:00
Glenn Strauss 446866333f [multiple] use *(unsigned char *) with ctypes 2020-07-08 22:51:31 -04:00
Glenn Strauss 455dc03778 [core] prefer getxattr() instead of get_attr()
(when lighttpd is built ./configure --with-attr)
2020-07-08 22:51:31 -04:00
Glenn Strauss cb753ec5b5 [mod_mbedtls] mbedTLS option for TLS
(experimental)

mod_mbedtls supports most ssl.* config options supported by mod_openssl

thx Ward Willats for the initial discussion and attempt in the comments
  https://redmine.lighttpd.net/boards/3/topics/7029
2020-07-08 22:51:31 -04:00
Glenn Strauss 7de51cc77b [core] add seed before openssl RAND_pseudo_bytes() 2020-07-08 19:54:30 -04:00
Glenn Strauss ce7840504d [mod_openssl] disable cert vrfy if ALPN acme-tls/1
disable client cert verification if ALPN "acme-tls/1"
2020-07-08 19:54:30 -04:00
Glenn Strauss f7bac374ee [mod_accesslog] process backslash-escapes in fmt
Process basic backslash-escapes in format string from lighttpd.conf
Supported sequences: \a \b \f \n \r \t \v
Other backslash-sequences are replaces with the char following backslash

(Apache mod_log_config supports \n and \t as special-cases)
2020-07-08 19:54:30 -04:00
Glenn Strauss f70912ee44 [mod_webdav] define PATH_MAX if not defined
(PATH_MAX does not appear to be defined on hurd-i386)
2020-07-08 19:54:30 -04:00
Glenn Strauss abe61d0445 [core] return EINVAL if stat_cache_get_entry w/o /
return EINVAL if stat_cache_get_entry() called on path w/o leading '/'
2020-07-08 19:54:30 -04:00
Glenn Strauss e6c47d6ecf [mod_cgi] remove redundant calls to set FD_CLOEXEC 2020-07-08 19:54:30 -04:00
Glenn Strauss 95b2774863 [core] skip excess close() when FD_CLOEXEC defined
do not run through close() loop after fork() and before execve()
when FD_CLOEXEC is defined
2020-07-08 19:54:30 -04:00
Glenn Strauss b28a3714c4 [multiple] ./configure --with-nettle to use Nettle
./configure --with-nettle to use Nettle crypto lib for algorithms,
instead of OpenSSL or wolfSSL.  Note: Nettle does not provide TLS.

x-ref:
  "How to use SHA-256 without OpenSSL?"
  https://redmine.lighttpd.net/boards/2/topics/8903
2020-07-08 19:54:30 -04:00
Glenn Strauss 0acb0f3604 [multiple] fix some cc warnings in 32-bit, powerpc 2020-07-08 19:54:30 -04:00
Glenn Strauss c752d4696e [multiple] correct misspellings in comments
x-ref:
  "Script for fixing spelling errors with codespell"
  https://redmine.lighttpd.net/boards/3/topics/8947
2020-07-08 19:54:30 -04:00
Glenn Strauss bcddbe186f [mod_proxy] stream request using HTTP/1.1 chunked (fixes #3006)
stream request body using HTTP/1.1 Transfer-Encoding: chunked

(Note: if backend proxy target does not support HTTP/1.1,
 then do not use server.stream-request-body = 1 or 2)

If not streaming to backend, collect request body
(now supporting Transfer-Encoding: chunked from client
 and then sending with Content-Length to backend)

x-ref:
  "Lighty returns HTTP 411 Length Required with proxy and streaming requests/reponses body"
  https://redmine.lighttpd.net/issues/3006
2020-07-08 19:54:29 -04:00
Glenn Strauss 89082a12ca [config] blank server.tag if whitespace-only 2020-07-08 19:54:29 -04:00
Glenn Strauss bc89b98acb [build] fix build on MacOS X Tiger
See: https://trac.macports.org/ticket/58550
fixes for Tiger build, but can be applied generally to all builds
also requires legacysupport PortGroup for *at functions
kencu@macports.org

x-ref:
  https://trac.macports.org/ticket/58550
  https://github.com/macports/macports-ports/pull/4760
2020-07-08 19:54:29 -04:00
Glenn Strauss e1188e770e [mod_auth] "nonce_secret" option to validate nonce (fixes #2976)
"nonce_secret" option to validate nonce was generated by the server

Marginally hardens HTTP Digest Auth.  Necessary piece, but not
sufficient, to restrict re-use of nonce (mitigations for replay
or limiting nonce count reuse via nc=... are not implemented)

x-ref:
  "Digest auth nonces are not validated"
  https://redmine.lighttpd.net/issues/2976
2020-07-08 19:54:29 -04:00
Glenn Strauss 9fdf24468d [doc] src/t/README 2020-07-08 19:54:29 -04:00
Glenn Strauss 41a268b805 [core] parse header label before end of line
parse header label for colon before checking end of line for whitespace
2020-07-08 19:54:29 -04:00
Glenn Strauss b04f0311f9 [core] perf: tighten some code in some hot paths 2020-07-08 19:54:29 -04:00
Glenn Strauss a200e0c204 [core] use uint32_t in http_header.[ch]
headers should never approach anywhere remotely close to > 4 GB
2020-07-08 19:54:29 -04:00
Glenn Strauss 1d6003e575 [core] mark some chunk.c funcs as pure 2020-07-08 19:54:29 -04:00
Glenn Strauss eae84b6a69 [core] http_status_append() short-circuit 200 OK 2020-07-08 19:54:29 -04:00
Glenn Strauss 17e0b6fe30 [tests] use buffer_eq_slen() for str comparison
(substitute buffer_eq_slen() for buffer_is_equal_string())
2020-07-08 19:54:29 -04:00
Glenn Strauss dd91c1459c [core] http_response_config()
split from http_response_prepare()
2020-07-08 19:54:29 -04:00
Glenn Strauss 3f4f934485 [core] http_response_comeback()
group HANDLER_COMEBACK logic in http_response_comeback() and call it
from places that reset state in order to (sometimes partially) reprocess
a request.  This includes error handler (server.error-handler),
r->handler_module when cgi.local-redir, and looping in
http_response_prepare() when modules make changes to the request and
return HANDLER_COMEBACK (e.g. mod_rewrite, mod_magnet, mod_cml)

Also, set r->conditional_is_valid closer to where elements are set
(and become valid for use in condition checks), and parse target
in http_request_parse() instead of http_response_prepare()
2020-07-08 19:54:29 -04:00
Glenn Strauss a0029b21a1 [core] remove r->uri.path_raw; generate as needed
(r->uri.path_raw previously duplicated from r->target, minus query-part)
2020-07-08 19:54:29 -04:00
Glenn Strauss 9aa0b3409e [mod_magnet] modify r->target with "uri.path-raw" 2020-07-08 19:54:29 -04:00
Glenn Strauss d013d0abd3 [core] http_request_parse_target()
http_request_parse_target() split from http_response_prepare()
2020-07-08 19:54:29 -04:00
Glenn Strauss 34285ed0fa [core] dispatch handler in handle_request func
dispatch handler in connection_handle_request()
instead of in http_response_prepare()
2020-07-08 19:54:29 -04:00
Glenn Strauss c8a1cba0c1 [tests] t/test_mod_userdir
create t/test_mod_userdir to replace sparse tests in tests/mod-userdir.t
remove tests/mod-userdir.t
2020-07-08 19:54:29 -04:00
Glenn Strauss 8b7e110973 [tests] stub out config funcs in test_mod_* 2020-07-08 19:54:29 -04:00
Glenn Strauss 9914bb297b [core] C99 restrict on some base funcs
buffer.[ch], chunk.[ch], request.[ch], sock_addr.[ch]
2020-07-08 19:54:29 -04:00
Glenn Strauss c687e01c98 [core] r->uri.path always set, though might be ""
(might be "" if <backend>.server sets "fix-root-scriptname" => "enable")
2020-07-08 19:54:29 -04:00
Glenn Strauss 7c7f8c467c [multiple] split con, request (very large change)
NB: r->tmp_buf == srv->tmp_buf (pointer is copied for quicker access)

NB: request read and write chunkqueues currently point to connection
    chunkqueues; per-request and per-connection chunkqueues are
    not distinct from one another
      con->read_queue  == r->read_queue
      con->write_queue == r->write_queue

NB: in the future, a separate connection config may be needed for
    connection-level module hooks.  Similarly, might need to have
    per-request chunkqueues separate from per-connection chunkqueues.
    Should probably also have a request_reset() which is distinct from
    connection_reset().
2020-07-08 19:54:29 -04:00
Glenn Strauss cc2134c88b [multiple] copy small struct instead of memcpy()
when patching config
2020-07-08 19:54:29 -04:00
Glenn Strauss 31d9495330 [core] store subrequest_handler instead of mode
store pointer to module in handler_module instead of con->mode id
2020-07-08 19:54:29 -04:00
Glenn Strauss eea7cd3c2f [core] store (plugin *) in p->data
(self-referential)
2020-07-08 19:54:29 -04:00
Glenn Strauss aca9d45adf [core] move request state into (request_st *)
NB: in the future, a separate connection state may be needed for
    connection-level state (different from request state)
2020-07-08 19:54:29 -04:00
Glenn Strauss a22cdca1cb [core] move addtl request-specific struct members 2020-07-08 19:54:29 -04:00
Glenn Strauss 100dfaa3f3 [core] move plugin_ctx into (request_st *)
NB: in the future, a separate plugin_ctx may be needed for
    connection-level plugins to keep state across multiple requests
2020-07-08 19:54:29 -04:00
Glenn Strauss 8131e4396d [core] move addtl request-specific struct members 2020-07-08 19:54:29 -04:00
Glenn Strauss 1474be7859 [core] move addtl request-specific struct members 2020-07-08 19:54:29 -04:00
Glenn Strauss 6fe031ef37 [core] move request start ts into (request_st *)
move request start timestamps into (request_st *)
2020-07-08 19:54:29 -04:00
Glenn Strauss b157ee8dfa [mod_accesslog] log_access_record() fmt log record
separate func to append log record to buffer
2020-07-08 19:54:29 -04:00
Glenn Strauss 88ac4367f0 [core] (const connection *) in http_header_*_get() 2020-07-08 19:54:29 -04:00
Glenn Strauss 3648d2908e [core] t/test_request.c using (request_st *)
further isolate t/test_request.c tests to use (request_st *)
2020-07-08 19:54:29 -04:00
Glenn Strauss af5df35275 [core] rename content_length to reqbody_length
rename content_length to reqbody_length in request,
to more easily differentiate request body length
from response content_length
2020-07-08 19:54:29 -04:00
Glenn Strauss 8c46768d5b [core] remove unused request_st member 'request' 2020-07-08 19:54:29 -04:00
Glenn Strauss 6870b0f55b [core] pass (request_st *) to request.c funcs
instead of (struct connection *)
2020-07-08 19:54:29 -04:00
Glenn Strauss 668cb6418f [core] move request_st,request_config to request.h 2020-07-08 19:54:29 -04:00
Glenn Strauss 550faf988c [core] rename specific_config to request_config 2020-07-08 19:54:29 -04:00
Glenn Strauss af3313bfa5 [core] pass http_parseopts around request.c 2020-07-08 19:54:29 -04:00
Glenn Strauss 6748a58cca [core] pass scheme port to http_request_parse()
con->proto_default_port is a property of the connection,
which influences the default port used in host normalization
2020-07-08 19:54:29 -04:00
Glenn Strauss 057d83c50b [core] move keep_alive flag into request_st 2020-07-08 19:54:29 -04:00
Glenn Strauss 33430ce2b0 [core] copy some srv->srvconf into con->conf
(for memory locality and to reduce pointer chasing)
2020-07-08 19:54:29 -04:00
Glenn Strauss 5bbe58728d [core] perf: buffer copy and append
reorder some code
add more const
avoid redundant asserts
2020-07-08 19:54:29 -04:00
Glenn Strauss 0d62b8657b [mod_webdav] use copy_file_range() if available 2020-07-08 19:54:29 -04:00
Glenn Strauss 3f7779d247 [core] restart dead piped loggers every 64 sec
(when piped logger exited too quickly after being restarted
 and when server.max-worker = 0)
2020-07-08 19:54:29 -04:00
Glenn Strauss 2c18090216 [core] remove include base.h where unused 2020-07-08 19:54:29 -04:00
Glenn Strauss 66bdd96d36 [core] isolate stat_cache subsystem
stat_cache.c no longer directly uses struct server *srv
2020-07-08 19:54:29 -04:00
Glenn Strauss 8588772caa [core] isolate fdevent subsystem
fdevent.c no longer directly uses struct server *srv
srv->srvconf.max_fds (if set) is used to set rlimits
set max_conns in server.c after fdevent_init(), which sets srv->max_fds
  using srv->srvconf.max_fds (if set) as input hint
2020-07-08 19:54:29 -04:00
Glenn Strauss 6dfe0b9a16 [core] slightly simpify server_(over)load_check() 2020-07-08 19:54:29 -04:00
Glenn Strauss 48004c6a7c [core] remove unused arg to fdevent_fcntl_set_nb* 2020-07-08 19:54:29 -04:00
Glenn Strauss 05cc88ddb4 [multiple] omit passing srv to fdevent_handler 2020-07-08 19:54:29 -04:00
Glenn Strauss fda01e3305 [core] support multiple error logs
e.g. different server.errorlog for different virtual hosts

Also, support different server.breakagelog to have separate script
error logs, applicable to mod_cgi and mod_ssi exec.
2020-07-08 19:54:29 -04:00
Glenn Strauss 19985261b2 [core] convenience macros to check req methods 2020-07-08 19:54:29 -04:00
Glenn Strauss 27e27e5e40 [core] static buffers for mtime_cache 2020-07-08 19:54:29 -04:00
Glenn Strauss b4a0ec05fd [core] include settings.h where used 2020-07-08 19:54:29 -04:00
Glenn Strauss 4069dc2ad7 [mod_accesslog] flush file log buffer at 8k size 2020-07-08 19:54:29 -04:00
Glenn Strauss f7d492ae0e [mod_webdav] large buffer reuse
employ chunk_buffer_acquire() and chunk_buffer_release()
2020-07-08 19:54:29 -04:00
Glenn Strauss 3cd74a16a2 [core] fdevent uses uint32_t instead of size_t 2020-07-08 19:54:29 -04:00
Glenn Strauss d5fd52ee86 [core] separate log_error_open* funcs
separate log_error_open* funcs to open breakagelog, filename, syslog
2020-07-08 19:54:29 -04:00
Glenn Strauss 6c1d57a29a [core] store log filename in (log_error_st *) 2020-07-08 19:54:28 -04:00
Glenn Strauss 1dd58c5ad8 [multiple] con->proto_default_port 2020-07-08 19:54:28 -04:00
Glenn Strauss 034d7d6734 [core] http_request_host_policy w/ http_parseopts
pass http_parseopts arg (instead of con) to http_request_host_policy()
2020-07-08 19:54:28 -04:00
Glenn Strauss 4fb26ea3b7 [core] http_status_set_error_close() 2020-07-08 19:54:28 -04:00
Glenn Strauss cbdbd60b35 [multiple] quiet clang compiler warnings 2020-07-08 19:54:28 -04:00
Glenn Strauss ca97505a72 [multiple] store srv->tmp_buf in tb var
rather than using srv->tmp_buf directly in code modifying temp buf (tb)
2020-07-08 19:54:28 -04:00
Glenn Strauss 3e8cdb2e54 [core] inline buffer in log_error_st errh 2020-07-08 19:54:28 -04:00
Glenn Strauss e50aa1b01f [core] (minor) config_plugin_keys_t data packing 2020-07-08 19:54:28 -04:00
Glenn Strauss 0ff60d8218 [multiple] rename r to rc rv rd wr to be different
variable rename
2020-07-08 19:54:28 -04:00
Glenn Strauss 03b4c993d2 [multiple] generic config array type checking 2020-07-08 19:54:28 -04:00
Glenn Strauss 81c9d0acf1 [mod_expire] parse config into structured data 2020-07-08 19:54:28 -04:00
Glenn Strauss 68d8d4c532 [multiple] stat_cache singleton 2020-07-08 19:54:28 -04:00
Glenn Strauss b5775b9951 [multiple] reduce direct use of srv->errh 2020-07-08 19:54:28 -04:00
Glenn Strauss c8cd7cf49b [multiple] extern log_epoch_secs
replace srv->cur_ts
2020-07-08 19:54:28 -04:00
Glenn Strauss 409bba80b1 [multiple] reduce direct use of srv->cur_ts 2020-07-08 19:54:28 -04:00
Glenn Strauss 68c58c162b [core] log_error_multiline_buffer()
replaces log_error_write_multiline_buffer()
2020-07-08 19:54:28 -04:00
Glenn Strauss 6f39097ab6 [core] pass con around gw_backend instead of srv 2020-07-08 19:54:28 -04:00
Glenn Strauss 304e46d4f8 [core] default chunk size 8k (was 4k) 2020-07-08 19:54:28 -04:00
Glenn Strauss de73b190a4 [core] read up-to fixed size chunk before fionread 2020-07-08 19:54:28 -04:00
Glenn Strauss f24e6d696a [multiple] plugin_stats array
use global rather than passing around (server *) just for that

li_itostrn() and li_utostrn() return string length
(rather than requiring subsequent strlen() to find length)
2020-07-08 19:54:28 -04:00
Glenn Strauss 50bdb55de8 [multiple] connection hooks no longer get (srv *)
(explicit (server *) not passed; available in con->srv)
2020-07-08 19:54:28 -04:00
Glenn Strauss 0fcd51438d [core] create http chunk header on the stack
streamline code in http_chunk.c
2020-07-08 19:54:28 -04:00
Glenn Strauss 010c28949c [multiple] prefer (connection *) to (srv *)
convert all log_error_write() to log_error() and pass (log_error_st *)

use con->errh in preference to srv->errh (even though currently same)

avoid passing (server *) when previously used only for logging (errh)
2020-07-08 19:54:28 -04:00
Glenn Strauss 644725127f [core] connection_handle_errdoc() separate func 2020-07-08 18:08:52 -04:00
Glenn Strauss c2a16bb228 [core] gw_backend less pointer chasing 2020-07-08 18:08:52 -04:00
Glenn Strauss cec18f4381 [core] gw_exts_clear_check_local() 2020-07-08 18:08:52 -04:00
Glenn Strauss 24680a9142 [core] array_init() arg for initial size 2020-07-08 18:08:52 -04:00
Glenn Strauss a03afc9043 [mod_auth] inline arrays in http_auth_require_t
also, keep ptr to const buffer *realm rather than copy
2020-07-08 18:08:52 -04:00
Glenn Strauss c193da3404 [core] split cond cache from cond matches 2020-07-08 18:08:52 -04:00
Glenn Strauss 5977ce2b4a [core] isolate use of data_config, configfile.h 2020-07-08 18:08:52 -04:00
Glenn Strauss 2ec70f234a [core] stat_cache_path_contains_symlink use errh
use log_error() with con->errh
2020-07-08 18:08:52 -04:00
Glenn Strauss 09ab979f30 [mod_wstunnel] change DEBUG_LOG to use log_error() 2020-07-08 18:08:51 -04:00
Glenn Strauss ba88ff0e93 [core] run all trigger and sighup handlers
(do not bail if a handler returns something other than HANDLER_GO_ON)

(preserve fn signature for simplicity and compat with plugin_fn_data)
2020-07-08 18:08:51 -04:00
Glenn Strauss b73949e03f [multiple] plugin.c handles common FREE_FUNC code
(simpler for modules; less boilerplate to cut-n-paste)
2020-07-08 18:08:51 -04:00
Glenn Strauss ea75c0b87d [core] remove old config_insert_values_*() funcs 2020-07-08 18:08:51 -04:00
Glenn Strauss 2495177131 [core] gw_backend config_plugin_values_init_block
switch gw_backend.c to use config_plugin_values_init_block()
2020-07-08 18:08:51 -04:00
Glenn Strauss 9339b73e0a [core] config_plugin_values_init_block()
split from config_plugin_values_init() for reuse by gw_backend.c
2020-07-08 18:08:51 -04:00
Glenn Strauss 65ef0a3d69 [core] collect more config logic into configfile.c 2020-07-08 18:08:51 -04:00
Glenn Strauss ed62e354ff [core] use config_plugin_values_init() 2020-07-08 18:08:51 -04:00
Glenn Strauss 83633a9f06 [mod_openssl] use config_plugin_values_init() 2020-07-08 18:08:51 -04:00
Glenn Strauss d23071a38f [core] config_get_config_cond_info()
isolate direct use of (data_config *)
2020-07-08 18:08:51 -04:00
Glenn Strauss 4a6fe83837 [multiple] gw_backends config_plugin_values_init() 2020-07-08 18:08:51 -04:00
Glenn Strauss 0ad4911d39 [mod_rrdtool] use config_plugin_values_init() 2020-07-08 18:08:51 -04:00
Glenn Strauss 7f3917c1be [mod_rewrite] use config_plugin_values_init() 2020-07-08 18:08:51 -04:00
Glenn Strauss cdf27138fd [mod_redirect] use config_plugin_values_init() 2020-07-08 18:08:51 -04:00
Glenn Strauss 63a6e52ce4 [core] store addtl data in pcre_keyvalue_buffer
reduce pointer chasing in keyvalue.c

mark keyvalue.h config routines as cold
2020-07-08 18:08:51 -04:00
Glenn Strauss f7d1434366 [mod_webdav] use config_plugin_values_init() 2020-07-08 18:08:51 -04:00
Glenn Strauss e38e907f86 [mod_extforward] use config_plugin_values_init() 2020-07-08 18:08:51 -04:00
Glenn Strauss 3fe1827633 [mod_dirlisting] use config_plugin_values_init() 2020-07-08 18:08:51 -04:00
Glenn Strauss 131450da29 [mod_cgi] use config_plugin_values_init() 2020-07-08 18:08:51 -04:00
Glenn Strauss 858352f6e8 [core] add xsendfile* check if xdocroot is NULL 2020-07-08 18:08:51 -04:00
Glenn Strauss 16665ae5f4 [mod_compress] use config_plugin_values_init() 2020-07-08 18:08:51 -04:00
Glenn Strauss c83fcf0564 [mod_deflate] use config_plugin_values_init() 2020-07-08 18:08:51 -04:00
Glenn Strauss 8e713130b3 [mod_auth*] use config_plugin_values_init() 2020-07-08 18:08:51 -04:00
Glenn Strauss 12b11f3042 [mod_maxminddb] use config_plugin_values_init() 2020-07-08 18:08:51 -04:00
Glenn Strauss e2718f85cb [mod_mysql_vhost] use config_plugin_values_init() 2020-07-08 18:08:51 -04:00
Glenn Strauss 2a281ec6ea [mod_vhostdb*] use config_plugin_values_init() 2020-07-08 18:08:51 -04:00
Glenn Strauss d1fba24469 [mod_evhost] use config_plugin_values_init()
use array of buffers to increase performance
(reduce pointer chasing)
2020-07-08 18:08:51 -04:00
Glenn Strauss 28691e6f84 [mod_simple_vhost] use config_plugin_values_init()
replace caching with one-element cache of last directory root

stat_cache is a cache and will handle additional caching, as configured
2020-07-08 18:08:51 -04:00
Glenn Strauss 74bbb3077f [mod_accesslog] use config_plugin_values_init()
inline various structures and use C99 VLA to increase performance
(reduce pointer chasing)
2020-07-08 18:08:51 -04:00
Glenn Strauss adbbc6a4f5 [mod_trigger_b4_dl] use config_plugin_values_init() 2020-05-23 17:59:30 -04:00
Glenn Strauss ca95cea4b5 [mod_evasive] use config_plugin_values_init() 2020-05-23 17:59:30 -04:00
Glenn Strauss b07bc5d266 [mod_geoip] use config_plugin_values_init() 2020-05-23 17:59:30 -04:00
Glenn Strauss 66a460d977 [mod_secdownload] use config_plugin_values_init() 2020-05-23 17:59:30 -04:00
Glenn Strauss 4b0c9c9853 [mod_cml] use config_plugin_values_init() 2020-05-23 17:59:30 -04:00
Glenn Strauss 364939096a [mod_status] use config_plugin_values_init() 2020-05-23 17:59:30 -04:00
Glenn Strauss 3dacea4927 [mod_uploadprogress] use config_plugin_values_init() 2020-05-23 17:59:30 -04:00
Glenn Strauss 5b58e5e47e [mod_ssi] use config_plugin_values_init() 2020-05-23 17:59:30 -04:00
Glenn Strauss be7eb1083a [mod_userdir] use config_plugin_values_init() 2020-05-23 17:59:30 -04:00
Glenn Strauss 28b7d0b656 [mod_userdir] split policy from userdir path build 2020-05-23 17:59:30 -04:00
Glenn Strauss 5fd8e1940e [mod_usertrack] use config_plugin_values_init() 2020-05-23 17:59:29 -04:00
Glenn Strauss 84ccd87b31 [mod_magnet] use config_plugin_values_init() 2020-05-23 17:59:29 -04:00
Glenn Strauss 476fd9569c [mod_flv_streaming] use config_plugin_values_init() 2020-05-23 17:59:29 -04:00
Glenn Strauss 32c42074ec [mod_expire] use config_plugin_values_init() 2020-05-23 17:59:29 -04:00
Glenn Strauss 362ccedc41 [mod_indexfile] use config_plugin_values_init() 2020-05-23 17:59:29 -04:00
Glenn Strauss d5782eba65 [mod_alias] use config_plugin_values_init() 2020-05-23 17:59:29 -04:00
Glenn Strauss 3fabcc3653 [mod_setenv] use config_plugin_values_init() 2020-05-23 17:59:29 -04:00
Glenn Strauss a377b159ec [mod_skeleton] use config_plugin_values_init() 2020-05-23 17:59:29 -04:00
Glenn Strauss 49140fe308 [mod_staticfile] use config_plugin_values_init() 2020-05-23 17:59:29 -04:00
Glenn Strauss 4b9ee09857 [core] use (const char *) in config file parsing 2020-05-23 17:59:29 -04:00