Skip to content

[2.4.x] Backport mod_env SetEnvFromFile - #934

Open
cisbiceanu wants to merge 1 commit into
apache:2.4.xfrom
cisbiceanu:backport-setenvfromfile
Open

cisbiceanu wants to merge 1 commit into
apache:2.4.xfrom
cisbiceanu:backport-setenvfromfile

Conversation

@cisbiceanu

@cisbiceanu cisbiceanu commented Nov 3, 2026 •

Copy link
Copy Markdown

This PR proposes backporting the SetEnvFromFile directive from trunk to the stable 2.4.x branch.

The implementation was accepted in 837965fd1e (r1938506), following discussion in #750.

Motivation

SetEnvFromFile allows administrators to populate httpd’s internal environment from a file of name=value entries, read at configuration time. This keeps variable values separate from the main configuration while preserving the behavior of SetEnv for CGI, SSI, and other consumers.

Changes

  • Backport the accepted mod_env implementation without functional changes.
  • Include the directive documentation and changelog entry.
  • Enable the existing regression tests for versions starting with the proposed target, 2.4.70, while retaining their skip behavior on older releases.

As in trunk, the directive is not permitted in .htaccess, to prevent untrusted configuration authors from exposing files readable by the server.

Validation

Built and tested locally on macOS against Apache 2.4.70-dev. All four directive regression tests passed: file parsing, malformed-line handling, .htaccess rejection, and missing-file configuration failure. Documentation DTD validation also passed.

The release number is provisional and can be adjusted to the version selected for the backport. The corresponding backported_in test marker should also be mirrored to trunk when the backport is accepted.

Backport trunk commit 837965f (r1938506). Include the stable-branch documentation, changelog, and test availability marker for 2.4.70.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant