httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 57525] mod_macro use-after-clear bug
Date Tue, 22 Aug 2017 15:10:40 GMT

Jose Kahan <> changed:

           What    |Removed                     |Added
           Severity|major                       |regression
          Component|Other Modules               |Core
         Resolution|FIXED                       |---
             Status|RESOLVED                    |REOPENED
            Version|2.4.10                      |2.4.25

--- Comment #5 from Jose Kahan <> ---
Before this patch was applied, it was possible to define macros in the main
server configuration and reuse them inside .htaccess. After the patch, server
returns a 500 whenever it finds such a macro definition.

Scenario: define a macro and store it under conf-enabled/macros.conf:
<Macro foo>
 # just a comment, but could be any valid directive

In a directory that has a resource you can normally access, add an .htaccess
that refers to the macro:


Use foo

If you browse that URL, the server now returns an HTTP 500.

This behavior comes from clearing the macros in macro_pre_config() commited in
r1656669 :
ap_macros = NULL;

That function is probably being called each time .htaccess are evaluated and
clearing the existing macro definitions.

When I commented it in the source code and recompiled, the previous behavior
was restored.

This error appeared when migrating from debian jessie to stretch. Although
stretch is using 2.4.25, the code in mod_macros predates that so it's probable
the same bug can be reproduced in the latest apache. The changelog doesn't
report any related change since for that module.

I'm marking this as a regression.

You are receiving this mail because:
You are the assignee for the bug.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message