Commit Graph

230 Commits

Author SHA1 Message Date
aa1476072e * support/htcacheclean.c (list_urls): Continue rather than stopping
after listing a file for each subdirectory.

PR: 65091
Submitted by: Artem Egorenkov <aegorenkov.91 gmail.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1915508 13f79535-47bb-0310-9956-ffa450edef68
2024-02-01 08:39:48 +00:00
bc0e56cdd3 *) mod_http2: v2.0.26 with the following fixes:
- Fixed `Date` header on requests upgraded from HTTP/1.1 (h2c). Fixes
       <https://github.com/icing/mod_h2/issues/272>.
     - Fixed small memory leak in h2 header bucket free. Thanks to
       Michael Kaufmann for finding this and providing the fix.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1915281 13f79535-47bb-0310-9956-ffa450edef68
2024-01-17 08:38:02 +00:00
64ecf00d7c mod_headers: Avoid infinite recursion with the edit* action and empty matches.
Change the recursion used for edit* to a loop using the new ap_regexec_ex()
function taking the current position (offset) in the subject string.

After an empty match do the same thing as pcre2_substitute() (or Perl's /g),
that is: don't allow for another empty match at the same positition by setting
the AP_REG_NOTEMPTY_ATSTART option. If there is a non-empty match use it,
otherwise skip/consume the first character and continue from there.

* modules/metadata/mod_headers.c:
  Rename the hdr_edit_r enum for edit* to hdr_edit_all to better express what
  is does (and since the action is not recursive anymore).

* modules/metadata/mod_headers.c(push_string, push_match):
  New helpers to consume the subject and substitutions in an array of iovec.

* modules/metadata/mod_headers.c(process_regexp):
  Implement the new logic, using push_match() and push_string() to fill the
  iovec array finally passed to apr_strcatv() for the resulting string.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1915271 13f79535-47bb-0310-9956-ffa450edef68
2024-01-16 17:40:36 +00:00
b5b2ca3f3e * modules/http/chunk_filter.c (ap_http_chunk_filter): For a brigade
containing [FLUSH EOS], insert the last-chunk terminator before the
  FLUSH rather than between the FLUSH and the EOS.

Github: closes #400


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1914804 13f79535-47bb-0310-9956-ffa450edef68
2023-12-20 15:56:15 +00:00
cc796e269d mod_ssl: Add support for loading keys from OpenSSL 3.x providers via
the STORE API. Separates compile-time support for the STORE API
(supported in 3.x) from support for the ENGINE API (deprecated in
3.x).

* modules/ssl/ssl_private.h: Define MODSSL_HAVE_OPENSSL_STORE for
  OpenSSL 3.0+.

* modules/ssl/ssl_engine_pphrase.c (modssl_load_store_uri,
  modssl_load_keypair_store): New functions.
  (modssl_load_keypair_engine): Renamed from modssl_load_keypair_engine.
  (modssl_load_engine_keypair): Reimplement to use new STORE-based
  functions if SSLCryptoDevice was not configured, or else old
  ENGINE implementation.

* modules/ssl/ssl_util.c (modssl_is_engine_id): Match pkcs11: URIs
  also for the OpenSSL 3.x STORE API.

* modules/ssl/ssl_engine_init.c (ssl_init_server_certs): Tweak log
  message on error paths for the provider/STORE case.

Signed-off-by: Ingo Franzki <ifranzki linux.ibm.com>
Submitted by: Ingo Franzki <ifranzki linux.ibm.com>
Github: closes #397, closes #398


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1914365 13f79535-47bb-0310-9956-ffa450edef68
2023-12-05 15:26:22 +00:00
7f7e8e2b93 Optimise handling LDAP authorization where LDAP was not used
previously for LDAP authentication.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1914067 13f79535-47bb-0310-9956-ffa450edef68
2023-11-23 10:22:58 +00:00
cf5e1a0601 Add an option to specify a source address.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1914045 13f79535-47bb-0310-9956-ffa450edef68
2023-11-22 17:19:49 +00:00
27a68e54b7 mod_xml2enc: remove dependency on xmlstring header
Submitted by: ttachi <tachihara@hotmail.com>

Github: closes #393


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1914013 13f79535-47bb-0310-9956-ffa450edef68
2023-11-21 12:58:47 +00:00
fbc113c3cf mod_ldap: HTML-escape ldap-status handler.
Reported by Chamal De Silva.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1913855 13f79535-47bb-0310-9956-ffa450edef68
2023-11-16 19:53:18 +00:00
0b06bfae4d Follow up to r1908537: CHANGES entry.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1913832 13f79535-47bb-0310-9956-ffa450edef68
2023-11-16 11:44:31 +00:00
077db53918 Follow up to r1913815: credit Joe in CHANGES too.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1913816 13f79535-47bb-0310-9956-ffa450edef68
2023-11-15 22:24:28 +00:00
922d6bbc42 mod_ssl: Disable the OpenSSL ENGINE API when OPENSSL_NO_ENGINE is set. PR 68080
Also, always allow for "SSLCryptoDevice builtin" even if the ENGINE API is not
available, OPENSSL_NO_ENGINE or more generally with the new API (providers)
available since OpenSSL >= 3.

* ssl_private.h: Set MODSSL_HAVE_ENGINE_API to 0 if OPENSSL_NO_ENGINE.

* mod_ssl.c, ssl_engine_config.c: Don't depend on HAVE_OPENSSL_ENGINE_H and
  HAVE_ENGINE_INIT to provide [ssl_cmd_]SSLCryptoDevice.


Submitted by: ylavic, jorton



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1913815 13f79535-47bb-0310-9956-ffa450edef68
2023-11-15 22:09:05 +00:00
99e0640f1e * mod_md: Fix the reported "until" validity of a certificate in the status
handler. [Rainer Jung]
   Fix possible NULL deref when logging the error that an authentication
   resource could not be retrieved from the ACME server. [Stefan Eissing]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1913466 13f79535-47bb-0310-9956-ffa450edef68
2023-10-31 10:24:11 +00:00
ea5fb57588 * Document r1912459. [skip ci]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1913432 13f79535-47bb-0310-9956-ffa450edef68
2023-10-30 10:44:59 +00:00
8943c469eb * mod_http2: improved early cleanup of streams.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1912999 13f79535-47bb-0310-9956-ffa450edef68
2023-10-16 08:57:51 +00:00
afcdbeebbf mod_dav_fs: add DAVLockDBType directive.
* modules/dav/fs/dbm.c (dav_dbm_open_direct): Take a dbmtype argument
  and use it to select the apr_dbm driver type.
  (dav_dbm_open): Continue to use the "default" propdb type to open
  the property databases.

* modules/dav/fs/lock.c: Store and pass through the lockdb_type
  through.

* modules/dav/fs/mod_dav_fs.c (dav_get_lockdb_path): Return the dbm
  type via an output argument.
  (dav_fs_cmd_davlockdbtype): New config directive.
  (dav_fs_merge_server_config): Merge the dbm type.
  (dav_fs_post_config): Set the default lockdb type.

* modules/dav/fs/repos.h: Update prototypes as above; internal API
  only so no compat concerns.

Github: closes #386


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1912718 13f79535-47bb-0310-9956-ffa450edef68
2023-10-03 12:58:16 +00:00
84430d7f0b * mod_http2: fixed a bug in handling of stream timeouts.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1912385 13f79535-47bb-0310-9956-ffa450edef68
2023-09-18 07:55:16 +00:00
a2dabc2122 *) mod_proxy_http2: fix X-Forward-Host header to carry the correct value.
Fixed PR66752.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1912180 13f79535-47bb-0310-9956-ffa450edef68
2023-09-08 07:39:50 +00:00
7c50a846c1 *) mod_proxy_http2: improved error handling on connection errors while
response is already underway.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1911964 13f79535-47bb-0310-9956-ffa450edef68
2023-08-28 13:27:10 +00:00
201d732767 * mod_md: fixed passing of the server environment variables to programs
started via MDMessageCmd and MDChallengeDns01 on *nix system.
   See <https://github.com/icing/mod_md/issues/319>.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1911721 13f79535-47bb-0310-9956-ffa450edef68
2023-08-16 11:40:21 +00:00
d62d3143f4 *) mod_http2: Fix reporting of Total Accesses in server-status to not count
HTTP/2 requests twice. Fixes PR 66801.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1911291 13f79535-47bb-0310-9956-ffa450edef68
2023-07-26 12:18:06 +00:00
bc8431b198 mod_alias: Add AliasPreservePath directive to map the full
path after the alias in a location.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1911067 13f79535-47bb-0310-9956-ffa450edef68
2023-07-17 15:25:13 +00:00
c69fae8d56 * mod_md:
- New directive `MDMatchNames all|servernames` to allow more control over how
     MDomains are matched to VirtualHosts.
   - New directive `MDChallengeDns01Version`. Setting this to `2` will provide
     the command also with the challenge value on `teardown` invocation. In version
     1, the default, only the `setup` invocation gets this parameter.
     Refs #312. Thanks to @domrim for the idea.
   - For Managed Domain in "manual" mode, the checks if all used ServerName and
     ServerAlias are part of the MDomain now reports a warning instead of an error
     (AH10040) when not all names are present.
   - MDChallengeDns01 can now be configured for individual domains.
     Using PR from Jérôme Billiras (@bilhackmac) and adding test case and fixing proper working
   - Fixed a bug found by Jérôme Billiras (@bilhackmac) that caused the challenge
     teardown not being invoked as it should.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910996 13f79535-47bb-0310-9956-ffa450edef68
2023-07-14 12:26:50 +00:00
21e6989f8d apxs: Fix -i for some cases where -n is not used.
The $base was already stripped of suffix in typical case.

Submitted by: Jan Pazdziora <jpazdziora redhat.com>
Github: closes #359


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910841 13f79535-47bb-0310-9956-ffa450edef68
2023-07-07 07:57:35 +00:00
77ae6da62c *) mod_http2: new directive H2ProxyRequests on|off to enable handling
of HTTP/2 requests in a forward proxy configuration.
     General forward proxying is enabled via `ProxyRequests`. If the
     HTTP/2 protocol is also enabled for such a server/host, this new
     directive is needed in addition.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910656 13f79535-47bb-0310-9956-ffa450edef68
2023-06-28 11:22:49 +00:00
2d8a447551 PR66672: rewrite QSA+trailing ? regression
mod_rewrite: Fix a recent regression where a rule with both a trailing
'?' and the [QSA] flag did not have the query appended.  PR66672

Submitted By: Frank Meier <frank.meier ergon.ch>



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910633 13f79535-47bb-0310-9956-ffa450edef68
2023-06-27 14:33:50 +00:00
3ed9d65b05 *) mod_http2: added support for bootstrapping WebSockets via HTTP/2, as
described in RFC 8441. A new directive 'H2WebSockets on|off' has been
     added. The feature is by default not enabled.
     As also discussed in the manual, this feature should work for setups
     using "ProxyPass backend-url upgrade=websocket" without further changes.
     Special server modules for WebSockets will have to be adapted,
     most likely, as the handling if IO events is different with HTTP/2.
     HTTP/2 WebSockets are supported on platforms with native pipes. This
     excludes Windows.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910507 13f79535-47bb-0310-9956-ffa450edef68
2023-06-20 12:01:09 +00:00
ccf4365117 *) mod_http2: fixed a bug that could lead to a crash in main connection
output handling. This occured only when the last request on a HTTP/2
     connection had been processed and the session decided to shut down.
     This could lead to an attempt to send a final GOAWAY while the previous
     write was still in progress. See PR 66646.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910386 13f79535-47bb-0310-9956-ffa450edef68
2023-06-13 14:36:43 +00:00
af4b652c80 *) mod_http2: fixed a bug in flushing pending data on an already closed
connection that could lead to a busy loop, preventing the HTTP/2 session
     to close down successfully. Fixed PR 66624.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910331 13f79535-47bb-0310-9956-ffa450edef68
2023-06-09 15:02:21 +00:00
ed69ae3384 *) core: add final_resp_passed flag to request_rec to allow
ap_die() to judge if it can send out a response. Bump mmn.
     Enable test cases that check errors during response body to
     appear as error on client side.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910161 13f79535-47bb-0310-9956-ffa450edef68
2023-06-01 12:21:03 +00:00
1c7a70c9d9 * mod_proxy_http2: fixed using the wrong "bucket_alloc" from the backend
connection when sending data on the frontend one. This caused crashes
   or infinite loops in rare situations.
 * mod_proxy_http2: fixed a bug in retry/response handling that could lead
   to wrong status codes or HTTP messages send at the end of response bodies
   exceeding the announced content-length.
 * mod_proxy_http2: fix retry handling to not leak temporary errors.
   On detecting that that an existing connection was shutdown by the other
   side, a 503 response leaked even though the request was retried on a
   fresh connection.
 * mod_http2: fixed a bug that did cleanup of consumed and pending buckets in
   the wrong order when a bucket_beam was destroyed.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910157 13f79535-47bb-0310-9956-ffa450edef68
2023-06-01 10:38:53 +00:00
4dbd67b54d *) mod_proxy_http2: fix retry handling to not leak temporary errors.
On detecting that that an existing connection was shutdown by the other
     side, a 503 response leaked even though the request was retried on a
     fresh connection.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909989 13f79535-47bb-0310-9956-ffa450edef68
2023-05-22 14:10:17 +00:00
14aa4f56d7 *) mod_http2: avoid double chunked-encoding on internal redirects.
PR 66597 [Yann Ylavic, Stefan Eissing]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909932 13f79535-47bb-0310-9956-ffa450edef68
2023-05-19 12:17:44 +00:00
bdd49d3845 *) mod_http2: v2.0.15 with the following fixes and improvements
- New directive 'H2EarlyHint name value' to add headers to a response,
       picked up already when a "103 Early Hints" response is sent. 'name' and
       'value' must comply to the HTTP field restrictions.
       This directive can be repeated several times and header fields of the
       same names add. Sending a 'Link' header with 'preload' relation will
       also cause a HTTP/2 PUSH if enabled and supported by the client.
     - Fixed an issue where requests were not logged and accounted in a timely
       fashion when the connection returns to "keepalive" handling, e.g. when
       the request served was the last outstanding one.
       This led to late appearance in access logs with wrong duration times
       reported.
     - Accurately report the bytes sent for a request in the '%O' Log format.
       This addresses #203, a long outstanding issue where mod_h2 has reported
       numbers over-eagerly from internal buffering and not what has actually
       been placed on the connection.
       The numbers are now the same with and without H2CopyFiles enabled.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909769 13f79535-47bb-0310-9956-ffa450edef68
2023-05-12 11:28:59 +00:00
918620a183 *) mod_tls: updating to rustls-ffi version 0.9.2 or higher.
Checking in configure for proper version installed. Code
     fixes for changed clienthello member name.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909558 13f79535-47bb-0310-9956-ffa450edef68
2023-05-02 08:36:02 +00:00
9b1964bf45 * In the reverse proxy case when we only want to keep encoded slashes untouched
we can have decoded '%''s in the URI that got sent to us in the original URL
  as %25. Don't error out in this case but just fall through and have them
  encoded to %25 when forwarding to the backend.

PR: 66580


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909464 13f79535-47bb-0310-9956-ffa450edef68
2023-04-28 06:20:27 +00:00
ce6f92eb85 * Add server directory to include path as mod_rewrite requires test_char.h.
PR: 66571
Submitted by: Valeria Petrov <valeria.petrov@spinetix.com>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909241 13f79535-47bb-0310-9956-ffa450edef68
2023-04-19 10:39:19 +00:00
f375a726eb Sync CHANGES.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908867 13f79535-47bb-0310-9956-ffa450edef68
2023-03-31 15:11:00 +00:00
d785d515b1 Follow up to r1908827: CHANGES entry.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908838 13f79535-47bb-0310-9956-ffa450edef68
2023-03-31 08:51:33 +00:00
fdf618ea34 fix regression in 2.4.56
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908813 13f79535-47bb-0310-9956-ffa450edef68
2023-03-30 20:32:19 +00:00
d6a9e454a6 *) mod_http2: fixed a crash during connection termination. See PR 66539.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908691 13f79535-47bb-0310-9956-ffa450edef68
2023-03-24 16:16:29 +00:00
c19e576e9a * Fix typo
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908629 13f79535-47bb-0310-9956-ffa450edef68
2023-03-22 08:21:42 +00:00
7a34a114dc Update ErrorLogFormat CHANGES entry for the full story.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908407 13f79535-47bb-0310-9956-ffa450edef68
2023-03-15 10:55:17 +00:00
e5fa6ee46e core: Add formats %{z} and %{strftime-format} to ErrorLogFormat. PR 62161.
%{z} prints the timezone offset (i.e. "[+-]nnnn") and %{strftime-format} allows
any %-format handled by [apr_]strftime().

* include/util_time.h():
  Define new AP_CTIME_OPTION_GMTOFF option for ap_recent_ctime_ex().

* server/util_time.c(ap_recent_ctime_ex):
  Handle AP_CTIME_OPTION_GMTOFF to print "[+-]nnnn" timezone.

* server/log.c(log_ctime):
  If the format contains a '%' it's for strftime(), otherwise it's builtin
  with new 'z' as AP_CTIME_OPTION_GMTOFF.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908380 13f79535-47bb-0310-9956-ffa450edef68
2023-03-14 11:11:24 +00:00
2fa15c2c06 Do not double encode encoded slashes
In case that AllowEncodedSlashes is set to NoDecode do not double encode
encoded slashes in the URL sent by the reverse proxy to the backend.

* include/ap_mmn.h: Document the addition of ap_proxy_canonenc_ex to the API.

* modules/proxy/mod_proxy.h: Declare ap_proxy_canonenc_ex and define flag
      values.

* modules/proxy/proxy_util.c: Implement ap_proxy_canonenc_ex by modifying
      ap_proxy_canonenc accordingly and reimplement ap_proxy_canonenc to
      use ap_proxy_canonenc_ex with the appropriate flag.

* modules/http2/mod_proxy_http2.c, modules/proxy/mod_proxy_*.c: Set the
      correct flag based on the AllowEncodedSlashes configuration and use
      ap_proxy_canonenc_ex instead of ap_proxy_canonenc.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908341 13f79535-47bb-0310-9956-ffa450edef68
2023-03-13 10:24:30 +00:00
3fc1d07f3b add [BCTLS] alternative to [B] for 2.4.56 problems
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908301 13f79535-47bb-0310-9956-ffa450edef68
2023-03-11 22:10:09 +00:00
07b802c934 allow decoded chars when they will be escaped
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908296 13f79535-47bb-0310-9956-ffa450edef68
2023-03-11 20:57:52 +00:00
2f895bbf8b * Add CHANGES entry for r1907505 [skip ci]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908186 13f79535-47bb-0310-9956-ffa450edef68
2023-03-08 09:55:07 +00:00
a47ee08073 *) mod_md:
- Enabling ED25519 support and certificate transparency information when
       building with libressl v3.5.0 and newer. Thanks to Giovanni Bechis.
     - MDChallengeDns01 can now be configured for individual domains.
       Thanks to Jérôme Billiras (@bilhackmac) for the initial PR.
     - Fixed a bug found by Jérôme Billiras (@bilhackmac) that caused the challenge
       teardown not being invoked as it should.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908080 13f79535-47bb-0310-9956-ffa450edef68
2023-03-05 09:59:34 +00:00
6c9b8075bc Sync changes [skip ci]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907983 13f79535-47bb-0310-9956-ffa450edef68
2023-03-02 15:24:08 +00:00