Repository navigation
build the HappyAxis.jsp probe address from the local connector - #1317
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
invokeTheService in HappyAxis.jsp now builds the address it posts the Version probe to from the connector the request arrived on (getScheme, getLocalAddr, getLocalPort, getContextPath) instead of request.getRequestURL(), and the IP instance field that carried it between requests is gone. getRequestURL is assembled from the client's Host header (or a forwarded host), and the page is anonymous and linked from the welcome page, so GET /axis2/axis2-web/HappyAxis.jsp with Host: 10.0.0.5:8080 made the server open a connection to that host and post a soap request to /axis2/services/Version, rendering the reply into the page when it parsed as soap and otherwise answering through the success/failure branch whether the port was open (server-side request forgery, CWE-918). the probe was always meant as an internal self-check, which the existing comment about not using frontendHostUrl says, so the socket's own address keeps that intent; the trade-off is that a deployment whose trusted proxy rewrites the scheme now probes the local connector with the rewritten scheme instead of going back out through the proxy. a webapp integration test sends the page a Host header naming a local listener: before the change the listener receives POST /axis2/services/Version, after it receives nothing and the page still reports the Version service.