tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53758] New: Dynamic Filter Registration mapping logic inverted
Date Tue, 21 Aug 2012 19:59:03 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=53758

          Priority: P2
            Bug ID: 53758
          Assignee: dev@tomcat.apache.org
           Summary: Dynamic Filter Registration mapping logic inverted
          Severity: major
    Classification: Unclassified
                OS: All
          Reporter: djgraff209@gmail.com
          Hardware: All
            Status: NEW
           Version: trunk
         Component: Catalina
           Product: Tomcat 7

In the class org.apache.catalina.core.ApplicationFilterRegistration, the
methods addMappingForServletNames and addMappingForUrlPatterns have inverted
logic on how to register the filter to the context.

If the parameter isMatchAfter is passed as true, the filter is placed in the
context using the addFilterMapBefore method.

if (isMatchAfter) {
    context.addFilterMapBefore(filterMap);
} else {
    context.addFilterMap(filterMap);
}

The logic should ultimate be (in both methods):

if (!isMatchAfter) {
    context.addFilterMapBefore(filterMap);
} else {
    context.addFilterMap(filterMap);
}

or

if (isMatchAfter) {
    context.addFilterMap(filterMap);
} else {
    context.addFilterMapBefore(filterMap);
}



svn rev on trunk is 1375614

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message