You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2015/09/21 08:14:06 UTC
[Bug 58433] New: RemoteIpValve not activated on redirect from
mapping
https://bz.apache.org/bugzilla/show_bug.cgi?id=58433
Bug ID: 58433
Summary: RemoteIpValve not activated on redirect from mapping
Product: Tomcat 8
Version: 8.0.26
Hardware: Macintosh
OS: Mac OS X 10.1
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: dev@tomcat.apache.org
Reporter: freds@jfrog.org
Mapping redirects adding the slash on empty path info will not use the correct
location header when a RemoteIpValve is configured in the engine or servlet
context.
Basically with the RemoteIpValve configured correctly, all returned Location
header on redirect are using the correct protocol, host and port.
But each time the query is "https://my.acme.com:5000/servlet" it redirects to
"http://my.acme.com/servlet/" loosing the protocol and port.
--
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
[Bug 58433] RemoteIpValve not activated on redirect from mapping
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58433
Fred Simon <fr...@jfrog.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |freds@jfrog.org
--- Comment #1 from Fred Simon <fr...@jfrog.org> ---
Created attachment 33120
--> https://bz.apache.org/bugzilla/attachment.cgi?id=33120&action=edit
Patch and test for this bug
I tried different approaches for this, but the fact that CoyoteAdapter has no
information about the features supported by the Valve was the biggest issue
here.
I added the "supportsFeature(String)" mechanism that can be used to have an
easy contract between Adapter and Valves.
I'll be happy to change my approach here if a better one is found.
This bug is quite critical for us.
--
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
[Bug 58433] RemoteIpValve not activated on redirect from mapping
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58433
Ahmed Hosni <ah...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ahmedhosni111@gmail.com
--
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
[Bug 58433] RemoteIpValve not activated on redirect from mapping
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58433
Remy Maucherat <re...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
--- Comment #2 from Remy Maucherat <re...@apache.org> ---
Not convinced personally, this adds overhead.
--
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
[Bug 58433] RemoteIpValve not activated on redirect from mapping
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58433
gonzalad <ad...@yahoo.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |adr_gonzalez@yahoo.fr
--
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
[Bug 58433] RemoteIpValve not activated on redirect from mapping
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58433
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #6 from Mark Thomas <ma...@apache.org> ---
This has been indirectly fixed by the addition of the context options
mapperContextRootRedirectEnabled and mapperDirectoryRedirectEnabled. Setting
these to false will cause the redirect to be performed by the DefaultServlet
which will be after the RemoteIpValve / RemoteIpFilter.
Be aware that some web applications may have been written on the assumption
that the Mapper handles the redirect and may require updates to correctly
handle paths without the trailing '/'.
--
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
[Bug 58433] RemoteIpValve not activated on redirect from mapping
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58433
Thomas Raehalme <th...@raehalme.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |thomas@raehalme.net
--
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
[Bug 58433] RemoteIpValve not activated on redirect from mapping
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58433
--- Comment #3 from Fred Simon <fr...@jfrog.org> ---
(In reply to Remy Maucherat from comment #2)
> Not convinced personally, this adds overhead.
I totally agree.
The main issue is proxyName and proxyPort are way too limiting. RemoteIpValve
and RemoteIpFilter are doing the job correctly.
Frankly I think that proxy configuration should be feature of the Adapter.
There are way too many ways to change the protocol, server name, port that are
activated at different stages in the pipeline stack.
When Tomcat is behind a load balancer, all requests should be modified
correctly.
--
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
[Bug 58433] RemoteIpValve not activated on redirect from mapping
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58433
--- Comment #4 from Karl von Randow <ka...@xk72.com> ---
We have encountered a similar issue. We have used the RemoteIpValve in our
Context, which works well in our use cases (we didn't encounter your issue).
However it does not work for error pages. It appears that error pages are
handled after exiting from RemoteIpValve, in which case the Request settings
have been reverted to their original values.
On our error pages we still want to be able to test request.isSecure(), for
example, to know whether to output secure or insecure URLs.
Apologies for the tangent; I believe our issue would be solved by handling this
in the adapter instead. Maybe this additional issues lends some weight to
investigating that? Otherwise perhaps some advice?
(We seem to be able to workaround the issue by using RemoteIpValve on the
Engine instead, but we'd prefer to use it at the Context level).
--
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
[Bug 58433] RemoteIpValve not activated on redirect from mapping
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58433
--- Comment #5 from Mike Roda <m2...@gmail.com> ---
Perhaps there should be a new Valve to handle the root redirects, with the new
Valve coming after RemoteIpValve so it redirects properly, and the existing
functionality pulled out of CoyoteAdapter and Mapper.
--
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
[Bug 58433] RemoteIpValve not activated on redirect from mapping
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58433
George Stanchev <st...@hotmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |stanchev@hotmail.com
--
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