1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00

9184 Commits

Author SHA1 Message Date
Stefan Eissing
a0521d289a Merge of r1895981,r1895986 from trunk:
*) mod_proxy: Don't prevent forwarding URIs w/ no hostname.
                (fix for r1895955 already in 2.4.x)



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1896044 13f79535-47bb-0310-9956-ffa450edef68
2021-12-16 11:23:49 +00:00
Stefan Eissing
07b9768cef Merge r1895970 from trunk:
*) mod_lua: Improve error handling



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1896039 13f79535-47bb-0310-9956-ffa450edef68
2021-12-16 11:15:47 +00:00
Yann Ylavic
a962ba7304 Merge r1895914, r1895921 from trunk:
*) http: Enforce that fully qualified uri-paths not to be forward-proxied
     have an http(s) scheme, and that the ones to be forward proxied have a
     hostname, per HTTP specifications.
     trunk patch: http://svn.apache.org/r1895914
                  http://svn.apache.org/r1895921
     2.4.x patch: https://patch-diff.githubusercontent.com/raw/apache/httpd/pull/286.patch
     backport PR: https://github.com/apache/httpd/pull/286
     +1: ylavic, minfrin, gbechis


mod_proxy: Detect unix: scheme syntax errors at load time.

* modules/proxy/mod_proxy.c(add_pass, add_member, set_proxy_param,
                            proxysection):
  Check return value of ap_proxy_de_socketfy().

* modules/proxy/proxy_util.c(ap_proxy_get_worker_ex):
  Check return value of ap_proxy_de_socketfy().



http: Enforce that fully qualified uri-paths not to be forward-proxied
      have an http(s) scheme, and that the ones to be forward proxied have a
      hostname, per HTTP specifications.

The early checks avoid failing the request later on and thus save cycles
for those invalid cases.


Submitted by: ylavic
Reviewed by: ylavic, minfrin, gbechis
Closes #286


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895955 13f79535-47bb-0310-9956-ffa450edef68
2021-12-14 15:35:56 +00:00
Stefan Eissing
fbda64f2f3 Merge r1889494,r1892563,r1892917 from trunk:
- mod_proxy_balancer: add missing spaces in HTML output
     - mod_proxy_http: Avoid a double call to apr_table_get()
     - mod_ssl: Fix some typo and doxygen issues
     [Jean-Frederic Clere]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895943 13f79535-47bb-0310-9956-ffa450edef68
2021-12-14 09:58:22 +00:00
Graham Leggett
1a4d3c4676 Backport.
*) mod_proxy_connect, mod_proxy: Do not change the status code after we
     already sent it to the client.
     Trunk version of patch:
        https://svn.apache.org/r1895715
     Backport version for 2.4.x of patch:
       https://patch-diff.githubusercontent.com/raw/apache/httpd/pull/283.diff
     Can be applied via apply_backport_pr.sh 283
     +1: rpluem, icing, minfrin



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895903 13f79535-47bb-0310-9956-ffa450edef68
2021-12-13 15:46:50 +00:00
Stefan Eissing
fec401af34 Merge r1895719 from trunk:
*) mod_http: Correctly sent a 100 Continue status code when sending an interim
     response as result of an Expect: 100-Continue in the request and not the
     current status code of the request. PR 65725 [Ruediger Pluem]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895897 13f79535-47bb-0310-9956-ffa450edef68
2021-12-13 15:16:55 +00:00
Stefan Eissing
8351a5b322 Merge r1879889,r1879889,r1893644 from trunk:
*) mod_dav: Some DAV extensions, like CalDAV, specify both document
     elements and property elements that need to be taken into account
     when generating a property. The document element and property element
     are made available in the dav_liveprop_elem structure by calling
     dav_get_liveprop_element(). [Graham Leggett]




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895893 13f79535-47bb-0310-9956-ffa450edef68
2021-12-13 15:02:44 +00:00
Stefan Eissing
a4b089f26e Merged r1879889,r1893643,r1893644 from trunk:
*) mod_dav: Add utility functions dav_validate_root_ns(),
     dav_find_child_ns(), dav_find_next_ns(), dav_find_attr_ns() and
     dav_find_attr() so that other modules get to play too.
     [Graham Leggett]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895887 13f79535-47bb-0310-9956-ffa450edef68
2021-12-13 14:43:38 +00:00
Graham Leggett
c1e16a6671 Backport:
*) mod_http2: fixes PR65731 and https://github.com/icing/mod_h2/issues/212
     trunk patch: na, fixed on 2.4.x source base
     backport PR: https://github.com/apache/httpd/pull/281
     +1: icing, minfrin, ylavic



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895869 13f79535-47bb-0310-9956-ffa450edef68
2021-12-13 10:33:48 +00:00
Graham Leggett
769bc2137a Backport.
*) mod_ssl: Updates to support OpenSSL 3.x
     trunk patch: https://svn.apache.org/r1519264
                  https://svn.apache.org/r1737657
                  https://svn.apache.org/r1876934
                  https://svn.apache.org/r1876936
                  https://svn.apache.org/r1876938
                  https://svn.apache.org/r1890067
                  https://svn.apache.org/r1890076
                  https://svn.apache.org/r1891138
                  https://svn.apache.org/r1893876
                  https://svn.apache.org/r1893964
                  https://svn.apache.org/r1894716
                  https://svn.apache.org/r1895774
     backport PR: https://github.com/apache/httpd/pull/258
     2.4.x patch: https://patch-diff.githubusercontent.com/raw/apache/httpd/pull/258.patch
                  or https://people.apache.org/~jorton/mod_ssl-openssl3.patch
     +1: jorton, minfrin, ylavic



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895868 13f79535-47bb-0310-9956-ffa450edef68
2021-12-13 10:27:03 +00:00
Yann Ylavic
9ecde98131 Revert r1895807 [skip ci].
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895808 13f79535-47bb-0310-9956-ffa450edef68
2021-12-11 12:57:53 +00:00
Yann Ylavic
4e5ec8ef75 Vote, promote [skip ci].
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895807 13f79535-47bb-0310-9956-ffa450edef68
2021-12-11 12:56:14 +00:00
Stefan Eissing
056dc00e0e *) mod_tls: added mod_tls from abetterinternet, donated
by ISRG/Prossimo <https://github.com/abetterinternet/mod_tls>.
     - adds font-/backend TLS (v1.2/v1.3) via the Rust rustls crate
       and its rustls-ffi C binding <https://github.com/rustls/rustls-ffi>.
     - documentation at <https://github.com/abetterinternet/mod_tls>
       (adding to Apache's manual TBD)
     - build support for Apache httpd configure on *nix platforms,
       rustls is linked statically into mod_tls.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895766 13f79535-47bb-0310-9956-ffa450edef68
2021-12-10 13:59:10 +00:00
Graham Leggett
c28fdf37f8 Backport:
*) mod_proxy_connect: Honor the smallest of the backend or client timeout
     while tunneling, and handle "proxy-nohalfclose" as opt-out for hlaf-close
     tunneling. PR 65631, 65662, 65689.
     trunk patch: http://svn.apache.org/r1894290
                  http://svn.apache.org/r1895304
     backport PR: https://github.com/apache/httpd/pull/278
     2.4.x patch: https://patch-diff.githubusercontent.com/raw/apache/httpd/pull/278.patch
     +1: ylavic, rpluem, minfrin



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895762 13f79535-47bb-0310-9956-ffa450edef68
2021-12-10 13:23:51 +00:00
Stefan Eissing
e924a7c6f8 Merge of 1893969,1894610,1894718,1895285,1895287 from trunk:
*) mod_md: Fix memory leak in case of failures to load the private key.
     PR 65620 [ Filipe Casal <filipe.casal@trailofbits.com> ]
  *) mod_md: adding v2.4.8 with the following changes
    - Added support for ACME External Account Binding (EAB).
      Use the new directive `MDExternalAccountBinding` to provide the
      server with the value for key identifier and hmac as provided by
      your CA.
      While working on some servers, EAB handling is not uniform
      across CAs. First tests with a Sectigo Certificate Manager in
      demo mode are successful. But ZeroSSL, for example, seems to
      regard EAB values as a one-time-use-only thing, which makes them
      fail if you create a seconde account or retry the creation of the
      first account with the same EAB.
    - The directive 'MDCertificateAuthority' now checks if its parameter
      is a http/https url or one of a set of known names. Those are
      'LetsEncrypt', 'LetsEncrypt-Test', 'Buypass' and 'Buypass-Test'
      for now and they are not case-sensitive.
      The default of LetsEncrypt is unchanged.
    - `MDContactEmail` can now be specified inside a `<MDomain dnsname>`
      section.
    - Treating 401 HTTP status codes for orders like 403, since some ACME
      servers seem to prefer that for accessing oders from other accounts.
    - When retrieving certificate chains, try to read the repsonse even
      if the HTTP Content-Type is unrecognized.
    - Fixed a bug that reset the error counter of a certificate renewal
      and prevented the increasing delays in further attempts.
    - Fixed the renewal process giving up every time on an already existing
      order with some invalid domains. Now, if such are seen in a previous
      order, a new order is created for a clean start over again.
      See <https://github.com/icing/mod_md/issues/268>
    - Fixed a mixup in md-status handler when static certificate files
      and renewal was configured at the same time.
  *) mod_md: values for External Account Binding (EAB) can
     now also be configured to be read from a separate JSON
     file. This allows to keep server configuration permissions
     world readable without exposing secrets.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895289 13f79535-47bb-0310-9956-ffa450edef68
2021-11-24 11:07:53 +00:00
Stefan Eissing
8966e290a6 Merge of r1894074 from trunk:
*) mod_proxy_uwsgi: Remove duplicate slashes at the beginning of PATH_INFO.
     PR 65616.  [Ruediger Pluem]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895097 13f79535-47bb-0310-9956-ffa450edef68
2021-11-17 08:42:35 +00:00
Graham Leggett
6e998eb486 Backport:
*) mod_http2: when a server is restarted gracefully, any idle h2 worker
   threads are shut down immediately.
   Also, change OpenSSL API use for deprecations in OpenSSL 3.0.
   Adds all other, never proposed code changes to make a clean
   sync of http2 sources.
   trunk patch: http://svn.apache.org/r1893214
                http://svn.apache.org/r1893215
                http://svn.apache.org/r1893220
                and other never proposed code changes
   PR: https://github.com/apache/httpd/pull/270
   +1: icing, rpluem, minfrin



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893658 13f79535-47bb-0310-9956-ffa450edef68
2021-09-26 14:30:51 +00:00
Graham Leggett
43e01b59a5 Backport:
*) mod_dav: Correctly handle errors returned by dav providers on REPORT
   requests.
   Trunk version of patch:
      https://svn.apache.org/r1893589
   Backport version for 2.4.x of patch:
    Trunk version of patch works
    svn merge -c 1893589 ^/httpd/httpd/trunk .
   +1: rpluem, minfrin, ylavic



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893656 13f79535-47bb-0310-9956-ffa450edef68
2021-09-26 14:18:55 +00:00
Graham Leggett
10b11e3c28 Backport:
*) mod_speling: Backport CheckBasenameMatch for PR44221
   trunk patch: http://svn.apache.org/r1557580
                http://svn.apache.org/r1732273
                http://svn.apache.org/r1844598
   2.4.x patch: full resync of code/docs due to conflicts + changes
                http://people.apache.org/~covener/patches/speling-sync.diff
   +1 covener, rpluem, ylavic



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893649 13f79535-47bb-0310-9956-ffa450edef68
2021-09-26 13:07:01 +00:00
Stefan Eissing
81a8b0133b backport of 1893519,1893532 from trunk:
*) mod_proxy: Handle UDS URIs with empty hostname ("unix:///...") as if they
     had no hostname ("unix:/..."), also in mod_rewrite's is_absolulte_uri().



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893559 13f79535-47bb-0310-9956-ffa450edef68
2021-09-23 12:31:53 +00:00
Stefan Eissing
6e768a811c Merge of r1893516 from trunk:
*) mod_rewrite: Fix UDS ("unix:") scheme for [P] rules.  PR 57691 + 65590.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893556 13f79535-47bb-0310-9956-ffa450edef68
2021-09-23 12:29:03 +00:00
Stefan Eissing
2dcc0bb4fe Merge of /httpd/httpd/trunk:r1893399
*) mod_md: when MDMessageCmd for a 'challenge-setup:<type>:<dnsname>'
     fails (!= 0 exit), the renewal process is aborted and an error is
     reported for the MDomain. This provides scripts that distribute
     information in a cluster to abort early with bothering an ACME
     server to validate a dns name that will not work. The common
     retry logic will make another attempt in the future, as with
     other failures.
     Fixed a bug when adding private key specs to an already working
     MDomain, see <https://github.com/icing/mod_md/issues/260>.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893400 13f79535-47bb-0310-9956-ffa450edef68
2021-09-17 12:41:45 +00:00
Stefan Eissing
dedd251e93 Merge of /httpd/httpd/trunk:r1893359
*) mod_md: fixed a bug in handling multiple parallel OCSP requests. These could
     run into an assertion which terminated (and restarted) the child process where
     the task was running. Eventually, all OCSP responses were collected, but not
     in the way that things are supposed to work.
     See also <https://bz.apache.org/bugzilla/show_bug.cgi?id=65567>.
     The bug was possibly triggered when more than one OCSP status needed updating
     at the same time. For example for several renewed certificates after a server
     reload.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893360 13f79535-47bb-0310-9956-ffa450edef68
2021-09-15 13:41:35 +00:00
Stefan Eissing
f9c54948e4 Merge r1890605, r1893164, r1893179 from trunk:
*) core/mod_proxy/mod_ssl:
     Adding `outgoing` flag to conn_rec, indicating a connection is
     initiated by the server to somewhere, in contrast to incoming
     connections from clients.
     Adding 'ap_ssl_bind_outgoing()` function that marks a connection
     as outgoing and is used by mod_proxy instead of the previous
     optional function `ssl_engine_set`. This enables other SSL
     module to secure proxy connections.
     The optional functions `ssl_engine_set`, `ssl_engine_disable` and
     `ssl_proxy_enable` are now provided by the core to have backward
     compatibility with non-httpd modules that might use them. mod_ssl
     itself no longer registers these functions, but keeps them in its
     header for backward compatibility.
     The core provided optional function wrap any registered function
     like it was done for `ssl_is_ssl`.


  *core: clarify comments and use hook API better to check for presence of callbacks.



 * optimizing hook check as suggested by Yann.



Submitted by: icing
Reviewed by: 

Github: closes #203


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893182 13f79535-47bb-0310-9956-ffa450edef68
2021-09-09 15:22:23 +00:00
Yann Ylavic
17a14e5bdb Merge r1893001, r1893002, r1893004 from trunk:
core: Set r->request_time before any logging, mod_unique_id needs it.

* server/protocol.c(read_request_line):
  Move r->request_time initialization before first APLOG_TRACE5,
  ap_log_rerror() may run the generate_log_id hooks and call mod_unique_id
  with no timestamp initialized (zero).
  


mod_unique_id: Follow up to r1892915: Shorter counter race condition yet.

* modules/metadata/mod_unique_id.c(gen_unique_id):
  Set the counter in network byte order for uuencoding only, allowing for
  simple cur_unique_id.counter++



mod_unique_id: Follow up to r1892915 and r1893002: Atomic counter.

* modules/metadata/mod_unique_id.c(gen_unique_id):
  Use an atomic 32bit counter to close the race condition with threaded MPMs,
  using the lower 16 bits for uuencoding still.


Submitted by: ylavic
Reviewed by: ylavic, rpluem, gbechis


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893116 13f79535-47bb-0310-9956-ffa450edef68
2021-09-08 08:31:38 +00:00
Yann Ylavic
4c1ed8e820 Merge r1893016 from trunk:
mod_proxy: Don't canonicalize with both nocanon and ProxyPassInterpolateEnv On.

If nocanon is set, we should match the unparsed_uri against the interpolated
alias (not the ProxyPass'ed one) when verifying the resulting length. Otherwise
we falsely restore the canonicalized URL in case of mismatch.  PR 65549.


Submitted by: Joel Self <joelself gmail.com>
Reviewed by: ylavic, covener, rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893111 13f79535-47bb-0310-9956-ffa450edef68
2021-09-08 08:27:47 +00:00
Yann Ylavic
a67c610394 mod_proxy: Axe unused ap_filter_input_pending in 2.4.x (only) after r1892971.
Submitted by: ylavic
Reviewed by: ylavic, icing,  covener


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893107 13f79535-47bb-0310-9956-ffa450edef68
2021-09-08 08:21:22 +00:00
Ruediger Pluem
d4901cb321 Merge r1892986, r1892987 from trunk:
mod_proxy: Follow up to r1892814.

* modules/proxy/proxy_util.c(fix_uds_filename):
  Sanity checks on the configured UDS path, fail with 500 if invalid since
  continuing through proxy processing wouldn't work as expected.



mod_proxy: Follow up to r1892986: APLOGNO()

Stefan get out of this body! :)


Submitted by: ylavic
Reviewed by: rpluem, ylavic, covener

Github: closes #265


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893101 13f79535-47bb-0310-9956-ffa450edef68
2021-09-08 07:00:09 +00:00
Ruediger Pluem
092dfece31 Merge r1869842 from trunk:
mod_ssl: Log private key material to file set by $SSLKEYLOGFILE in the
environment, using the standard format which can be parsed by (e.g.)
wireshark for decoding SSL/TLS traffic; supported from OpenSSL 1.1.1.

* modules/ssl/ssl_private.h: Add keylog_file to SSLModConfigRec.

* modules/ssl/ssl_engine_init.c (ssl_init_Module): Open log file if
  SSLKEYLOGFILE is set in the environment.
  (ssl_init_ctx_protocol): Register the keylog callback with OpenSSL.

* modules/ssl/ssl_engine_kernel.c (modssl_callback_keylog):
  New function.

PR: 63391
Github: closes #74


Submitted by: jorton
Reviewed by: rpluem, ylavic, jorton

Github: closes #264


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893099 13f79535-47bb-0310-9956-ffa450edef68
2021-09-08 06:55:40 +00:00
Yann Ylavic
1e93923874 Merge r1892915 from trunk:
Reduce the time window where duplicates may be generated by mod_uniqueid

Submitted by: jailletc36
Reviewed by: jailletc36, jorton, icing


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892982 13f79535-47bb-0310-9956-ffa450edef68
2021-09-06 10:53:04 +00:00
Yann Ylavic
123e27c560 Merge r1892914 from trunk:
Revert r1887244 and r1887245 which causes issues on Windows

Submitted by: jailletc36
Reviewed by: jailletc36, icing, jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892980 13f79535-47bb-0310-9956-ffa450edef68
2021-09-06 10:17:04 +00:00
Yann Ylavic
4ef2a7fcff Merge r1892740, r1892851 from trunk:
mod_proxy: Fix potential tunneling infinite loop and spurious timeout.
           PRs 65521 and 65519.

* modules/proxy/proxy_util.c(ap_proxy_tunnel_run):
  Avoid an infinite loop by shutting down the connection for write when poll()
  returns POLLHUP and read is already down.  PR 65521.

* modules/proxy/proxy_util.c(ap_proxy_tunnel_run):
  When write completion is finished don't check for ap_filter_input_pending()
  before proxy_tunnel_forward() to flush input data, this is a nonblocking read
  already which will do the same thing implicitely. ap_filter_input_pending()
  is broken in 2.4.x without the whole pending data mechanism (not backported
  yet), so let's align here.  PR 65519.


mod_proxy: Follow up to r1892740.

Really remove the old ap_filter_input_pending() handling forgotten by r1892740.


Submitted by: ylavic
Reviewed by: ylavic, covener, jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892971 13f79535-47bb-0310-9956-ffa450edef68
2021-09-06 08:34:19 +00:00
Yann Ylavic
2fa30bf37c Merge r1892599 from trunk:
mod_http2: fixes a use-after-read of an integer value when
   passing a stream identifier for further IO checking. A
   non-issue since an int value matching no active stream
   will lead to no action.


Submitted by: icing
Reviewed by: icing, jorton, ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892876 13f79535-47bb-0310-9956-ffa450edef68
2021-09-03 17:01:29 +00:00
Yann Ylavic
6d9672bf09 Merge r1892805 from trunk:
mod_proxy_uwsgi: Fix PATH_INFO setting for generic worker.

When the generic "proxy:reverse" worker is selected for an uwsgi scheme, the
worker name is irrelevant so uwscgi_handler() should point to the PATH_INFO
directly from the given URL.


Submitted by: ylavic
Reviewed by: ylavic, covener, rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892875 13f79535-47bb-0310-9956-ffa450edef68
2021-09-03 17:00:07 +00:00
Yann Ylavic
496c863776 Merge r1892814, r1892853 from trunk:
mod_proxy: Faster unix socket path parsing in the "proxy:" URL.

The actual r->filename format is "[proxy:]unix:path|url" for UDS, no need to
strstr(,"unix:") since it's at the start of the string.


mod_proxy: Follow up to r1892814.

Save some few cycles in ap_proxy_de_socketfy() too.


Submitted by: ylavic
Reviewed by: ylavic, covener, rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892874 13f79535-47bb-0310-9956-ffa450edef68
2021-09-03 16:52:38 +00:00
Yann Ylavic
0ae75f3453 Merge r1892728 from trunk:
* mod_deflate: refrain from reading buckets of known length, just
   to get their length. This may transform buckets unwanted (e.g. file
   to mmap) and prevent optimization down the filter chain.


Submitted by: icing
Reviewed by: icing, ylavic, jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892873 13f79535-47bb-0310-9956-ffa450edef68
2021-09-03 16:50:33 +00:00
Stefan Eissing
7e2e41a421 Merge of r1890693,r1890696 from trunk:
mod_ssl: tighten the handling of ALPN for outgoing (proxy)
     connections. If ALPN protocols are provided and sent to the
     remote server, the received protocol selected is inspected
     and checked for a match. Without match, the peer handshake
     fails.
     An exception is the proposal of "http/1.1" where it is
     accepted if the remote server did not answer ALPN with
     a selected protocol. This accomodates for hosts that do
     not observe/support ALPN and speak http/1.x be default.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892869 13f79535-47bb-0310-9956-ffa450edef68
2021-09-03 13:28:01 +00:00
Stefan Eissing
569bf29a28 Merge r1892782 from trunk:
* mod_md: Certificate/keys pairs are verified as matching before a renewal is accepted
    as successful or a staged renewal is replacing the existing certificates.
    This avoid potential mess ups in the md store file system to render the active
    certificates non-working. [@mkauf]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892783 13f79535-47bb-0310-9956-ffa450edef68
2021-09-01 13:22:19 +00:00
Yann Ylavic
be99f85dba Merge r1891206, r1891216, r1891284 from trunk:
mod_proxy: Fix possible reuse/merging of Proxy(Pass)Match workers.  PR 65419.

We can't truncate ProxyMatch's worker name/url to the first '$' substitution
without possibly colliding with other workers. This also makes the matching
done at runtime by ap_proxy_strcmp_ematch() completely pointless.

To fix this and still address r1878467 (i.e. make http://host:port$1 a "valid"
URL), we need to remove '$' substitutions from the :port part of the URL only
since it's allowed anywhere else by apr_uri_parse().

So let's strip them before apr_uri_parse() and prepend them back in the path
before apr_uri_unparse() to restore the original URL. Non-matchable workers are
not concerned so ap_proxy_define_worker() is made a local helper (w/o the ap_
prefix) which takes "matchable" as argument and can then be called by both
ap_proxy_define_[match_]worker() functions.


mod_proxy: Follow up to r1891206: fix UDS scheme.


mod_proxy: Avoid confusion of prefix/regex matching workers at loading.  PR 65429.

ap_proxy_get_worker() needs to know whether it should lookup for prefix or
match or both matching workers, depending on the context.

For instance <Proxy[Match]> or ProxyPass[Match] directives need to lookup for
an existing worker with the same type as the directive (*Match or not), because
they will define one with that matching type if none exists.

On the contrary, "ProxySet <url>" at load time or ap_proxy_pre_request() at run
time need to find a worker matching an url whether it's by prefix or by regex.

So this commit adds ap_proxy_get_worker_ex() which takes a bitmask for the
matching type and calls it appropriately where needed.

For consistency, ap_proxy_define_worker_ex() is also added, using the same
bitmask flags, deprecating ap_proxy_define_match_worker().

Follow up to r1891206.


Github: closes #261

Submitted by: ylavic
Reviewed by: ylavic, minfrin, icing


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892569 13f79535-47bb-0310-9956-ffa450edef68
2021-08-24 12:44:28 +00:00
Graham Leggett
21ee1a7dbf Backport:
*) back port the add of balancer_manage in mod_proxy_balancer.
     trunk patch: http://svn.apache.org/r1859235
                  http://svn.apache.org/r1887176
                  http://svn.apache.org/r1887359
                  http://svn.apache.org/r1887144
     Backport version for 2.4.x of patch:
          https://people.apache.org/~jfclere/patches/patch.210810.txt
     +1: jfclere, jim, minfrin



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892522 13f79535-47bb-0310-9956-ffa450edef68
2021-08-22 09:51:33 +00:00
Graham Leggett
c7c1f3905c Backport:
*) mod_dav: Add method_precondition hook. WebDAV extensions define
     conditions that must exist before a WebDAV method can be executed.
     This hook allows a WebDAV extension to verify these preconditions.
     trunk patch: http://svn.apache.org/r1879339
                  http://svn.apache.org/r1879340
     2.4.x patch: https://svn.apache.org/repos/asf/httpd/httpd/patches/2.4.x/httpd-2.4-dav-preconditions1.patch
     +1: minfrin, jim, ylavic (by inspection)



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892514 13f79535-47bb-0310-9956-ffa450edef68
2021-08-21 22:55:47 +00:00
Graham Leggett
532be2d244 Backport:
*) Add hooks deliver_report and gather_reports to mod_dav.h. Allows other
     modules apart from versioning implementations to handle the REPORT method.
     trunk patch: http://svn.apache.org/r1879339
                  http://svn.apache.org/r1879307
     2.4.x patch: https://svn.apache.org/repos/asf/httpd/httpd/patches/2.4.x/httpd-2.4-dav-hooks1.patch
     +1: minfrin, jim, ylavic (by inspection)



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892513 13f79535-47bb-0310-9956-ffa450edef68
2021-08-21 22:52:29 +00:00
Graham Leggett
6f73993e1c Backport:
*) Add dav_get_provider(), dav_open_lockdb(), dav_close_lockdb() and
     dav_get_resource() to mod_dav.h.
     trunk patch: http://svn.apache.org/r1879305
                  http://svn.apache.org/r1879466
     2.4.x patch: https://svn.apache.org/repos/asf/httpd/httpd/patches/2.4.x/httpd-2.4-dav-functions6.patch
     +1: minfrin, jim, ylavic (by inspection)



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892512 13f79535-47bb-0310-9956-ffa450edef68
2021-08-21 22:47:34 +00:00
Graham Leggett
c795f1c736 Backport:
*) Easy patches: synch 2.4.x and trunk
         - mod_auth_basic: Use ap_cstr_casecmp instead of strcasecmp.
         - mod_ldap: log and abort locking errors.
         - mod_ldap: style fix for r1831165
         - mod_ldap: build break fix for r1831165
      --> These 3 commits are preparation work for backporting r1856735
         - mod_deflate: Avoid hard-coded "%ld" format strings in mod_deflate's logging statements
         - mod_deflate: Use apr_uint64_t instead of uint64_t (follow up to r1849590)
         - mod_forensic: Follow up to r1856490: missing one mod_log_forensic test_char_table case.
                         (r1856490 has been backported in r1870261)
         - mod_rewrite: Save a few cycles.
         - mod_request: Fix a comment (missing '_' in 'keep_body') and some style issues
         - core: remove extra whitespace in HTTP_NOT_IMPLEMENTED
     trunk patch:
          https://svn.apache.org/r1817063
          https://svn.apache.org/r1831165
          https://svn.apache.org/r1831171
          https://svn.apache.org/r1831172
          https://svn.apache.org/r1849590
          https://svn.apache.org/r1849630
          https://svn.apache.org/r1856491
          https://svn.apache.org/r1883421
          https://svn.apache.org/r1889327
          https://svn.apache.org/r1891200
     2.4.x patch: svn merge -c 1817063,1831165,1831171,1831172,1849590,1849630,1856491,1883421,1889327,1891200 ^/httpd/httpd/trunk .
     +1: jailletc36, covener, jim
     icing: I have trouble running the svn merge due to conflicts in CHANGES and
            the infamous log tags. Do you have a patch or a PR to use for checking?
     covener: on faith



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892510 13f79535-47bb-0310-9956-ffa450edef68
2021-08-21 21:30:47 +00:00
Stefan Eissing
e04c7b15ee *) mod_proxy: Fix icomplete initialization of BalancerMember(s) from the
balancer-manager, which can lead to a crash.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892165 13f79535-47bb-0310-9956-ffa450edef68
2021-08-10 08:32:35 +00:00
Stefan Eissing
6a5d3e006b Merged /httpd/httpd/trunk:r1879074-1879080,1879094-1879095,1879110-1879112,1879114,1879116-1879117,1879137,1879144-1879145,1879147,1879149,1879235,1879360
back port the mapping=servlet proxy logic.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892161 13f79535-47bb-0310-9956-ffa450edef68
2021-08-10 08:27:18 +00:00
Stefan Eissing
0244d12ca3 Merged /httpd/httpd/trunk:r1891683
*) mod_md:
     - Domain names in `<MDomain ...>` can now appear in quoted form.
     - Fixed a failure in ACME challenge selection that aborted further searches
       when the tls-alpn-01 method did not seem to be suitable.
     - Changed the tls-alpn-01 setup to only become unsuitable when none of the
       dns names showed support for a configured 'Protocols ... acme-tls/1'. This
       allows use of tls-alpn-01 for dns names that are not mapped to a VirtualHost.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1891685 13f79535-47bb-0310-9956-ffa450edef68
2021-07-20 13:07:54 +00:00
Stefan Eissing
c0e971242e Merge: /httpd/httpd/trunk:r1891470
*) mod_md: fixed a potential null pointer dereference if ACME/OCSP
     server returned 2xx responses without content type. Reported by chuangwen.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1891471 13f79535-47bb-0310-9956-ffa450edef68
2021-07-12 08:04:51 +00:00
Graham Leggett
f4af9fc212 *) back port: Add CPING to health check logic - remove hardcoded timeout.
Trunk version of patch:
        https://svn.apache.org/r1887439
     Backport version for 2.4.x of patch:
      Trunk version of patch works
      svn merge -c 1887439 ^/httpd/httpd/trunk .
     +1: minfrin, rpluem, covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1891276 13f79535-47bb-0310-9956-ffa450edef68
2021-07-05 09:01:27 +00:00
Graham Leggett
044b45e0da *) back port: Add CPING to health check logic.
Trunk version of patch:
        https://svn.apache.org/r1887415
   Backport version for 2.4.x of patch:
      Trunk version of patch works
      svn merge -c 1887415 ^/httpd/httpd/trunk .
   +1: jfclere, jim, minfrin



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1890947 13f79535-47bb-0310-9956-ffa450edef68
2021-06-21 17:03:35 +00:00