You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2017/08/22 15:10:40 UTC

[Bug 57525] mod_macro use-after-clear bug

https://bz.apache.org/bugzilla/show_bug.cgi?id=57525

Jose Kahan <jo...@w3.org> 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 <jo...@w3.org> ---
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
</Macro>

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

.htaccess:

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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org