1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-28 11:57:22 +03:00

5 Commits

Author SHA1 Message Date
Jim Jagielski
40f72f7077 tests: Mark the tests of changes missing from 2.4.x, and keep 2.4.x's websockets tolerance
Add test/pyhttpd/backport.py with not_backported() and skip_not_backported(),
and a not_backported mark for test/pytest_suite.  They expect a failure, or
skip, on a server older than 2.5.0 and do nothing on trunk, so the same test
files can be carried to 2.4.x before the change they cover is backported.
Apply them to the tests of the trunk changes 2.4.x does not have yet
(mod_auth_digest, mod_sed, mod_cgid, mod_remoteip, mod_mime_magic, mod_dav,
mod_proxy_hcheck, mod_http2, mod_ssl, mod_md and the mod_systemd tests).

http2/test_800_websockets.py: in the error cases, accept a trailing RST and,
for malformed requests, a GOAWAY, as 2.4.x does.

pytest_suite: only set DAVMSext for 2.5.1 and later.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939495 13f79535-47bb-0310-9956-ffa450edef68
2026-10-26 19:20:53 +00:00
Joe Orton
54cc53eb4b mod_autoindex: fix one-byte over-read past end of description
Stop reading (and writing) one byte past the end of a file
description when it ends inside an unterminated "&" entity or "<"
tag, as a ScanHTMLTitles title can.

* modules/generators/mod_autoindex.c (terminate_description): Check
  for the terminating NUL before advancing past it when scanning an
  unterminated "<" tag or "&" entity, and break out of the loop at
  end of string rather than continuing past it.

* test/modules/generators/env.py (GeneratorsTestSetup.__init__): Load
  mod_autoindex for the generators test suite.

* test/modules/generators/htdocs/autoindex/: New test content.

* test/modules/generators/test_002_autoindex.py (TestAutoindex): New
  test that a ScanHTMLTitles description ending in a bare "&" is
  rendered without reading past the end of the description.

Submitted by: arshiya tabasum <arshi bugqore.com>
GitHub: closes #812


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939181 13f79535-47bb-0310-9956-ffa450edef68
2026-10-17 11:18:52 +00:00
Joe Orton
e3a8b4e1e6 mod_cgid: Raise the limit on the number of environment variables passed
to a script from 256 to APACHE_ARG_MAX, and bound URI/query/env-value
lengths against the configured request limits rather than APR_PATH_MAX.
PR 70270.

* changes-entries/cgid-env-limit.txt: Add changelog entry.

* modules/generators/mod_cgid.c: Replace ENV_COUNT_MAX with ENV_VAL_MAX,
  a sanity bound on the length of a single environment variable value.
  (get_req): Take the main server_rec as an argument.  Allow up to
  APACHE_ARG_MAX environment variables; check uri_len and args_len
  against the configured LimitRequestLine rather than APR_PATH_MAX;
  check each environment variable value against ENV_VAL_MAX.
  (send_req): Fail with APR_ENOSPC if more than APACHE_ARG_MAX
  environment variables are present.
  (cgid_server): Pass main_server to get_req.

* test/modules/generators/htdocs/cgi/: New tests scripts.

* test/modules/generators/test_001_cgid.py: New tests.

Submitted by: Emmanuel Dreyfus <manu netbsd.org>, jorton
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
GitHub: closes #850


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939165 13f79535-47bb-0310-9956-ffa450edef68
2026-10-16 18:55:52 +00:00
Jean-Frederic Clere
502faf44d5 Add --strict-optional to prevent success when missing modules.
Submitted by Maya Echtinaw

This closes #808



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939059 13f79535-47bb-0310-9956-ffa450edef68
2026-10-12 13:14:38 +00:00
Joe Orton
9a3dbc068c Add new pyhttpd-based test coverage for mod_cgid:
* modules/generators/mod_cgid.c (cgid_server): Log the daemon's pid
  at TRACE1 (so the tests can kill the daemon).

* test/modules/generators/: New test suite.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
GitHub: closes #772


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938602 13f79535-47bb-0310-9956-ffa450edef68
2026-09-28 10:49:09 +00:00