https://issues.apache.org/bugzilla/show_bug.cgi?id=54377
Bug ID: 54377
Summary: RemoteIpFilter does not correctly set request
attributes for AccessLog
Product: Tomcat 7
Version: 7.0.32
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
Classification: Unclassified
In RemoteIpFilter class, there is code that publishes the new request
attributes to AccessLog (see below).
821 if (requestAttributesEnabled) {
822 request.setAttribute(AccessLog.REMOTE_ADDR_ATTRIBUTE,
823 request.getRemoteAddr());
824 request.setAttribute(AccessLog.REMOTE_HOST_ATTRIBUTE,
825 request.getRemoteHost());
826 request.setAttribute(AccessLog.PROTOCOL_ATTRIBUTE,
827 request.getProtocol());
828 request.setAttribute(AccessLog.SERVER_PORT_ATTRIBUTE,
829 Integer.valueOf(request.getServerPort()));
830 }
The problem is that the source values should come from xRequest, e.g.
xRequest.getRemoteAddr() and xRequest.getRemoteHost(), etc.
As it is written above, RemoteIpFilter simply republishes the current values,
and AccessLog therefore does not display the correct values.
--
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]