1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00
Files
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
..