https://issues.apache.org/bugzilla/show_bug.cgi?id=48054

           Summary: FilterProvider matches always if the "dispatch" string
                    does not exist (except for match=*)
           Product: Apache httpd-2
           Version: 2.2.14
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_filter
        AssignedTo: [email protected]
        ReportedBy: [email protected]


I tried following configurations:

FilterProvider SSI INCLUDES env=PATH_INFO $index.html
FilterChain SSI

EXPECT results are:
Applied SSI for URL: /some.cgi/index.html
Not applied SSI for URL: /some.cgi/another.html
Not applied SSI for URL: /some.cgi

ACTUAL results are:
Applied SSI for URL: /some.cgi/index.html
Not applied SSI for URL: /some.cgi/another.html
Applied SSI for URL: /some.cgi

In filter_lookup() at mod_filter.c, when the "dispatch" string does not exist,
"matched" status will be changed to "not matched" only if match_type == DEFINED
(means FilterProvider's match argument is "*").

But above configurations expects to apply filters only if environment PATH_INFO
contains "index.html", and not to apply if PATH_INFO is empty or is not
defined.

The proposed change is simply

if (!str) {
    if (provider->match_type == DEFINED && provider->match.string) {
        match = 0;
    }
}

change to

if (!str) {
    match = 0;
}

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to