Skip to content

dispatch on the request path only in the request uri dispatchers - #1318

Open
kali834x wants to merge 1 commit into
apache:masterfrom
kali834x:request-uri-dispatch-path-only
Open

kali834x wants to merge 1 commit into
apache:masterfrom
kali834x:request-uri-dispatch-path-only

Conversation

@kali834x

Copy link
Copy Markdown
Contributor

the request uri dispatchers resolve the service and operation through Utils.getServiceAndOperationPart, getOperationName and parseRequestURLForServiceAndOperation, which searched the whole To address for the last occurrence of the service context path and cut the query string only afterwards. AxisServlet and AxisHttpService put the query string into the To address for REST requests, so GET /axis2/services/Echo?next=/axis2/services/Admin/deleteAll ran Admin/deleteAll, and POST /axis2/services/Echo/axis2/services/Admin reached Admin through the repeated suffix, while the container, a servlet filter or a reverse proxy matched its URL patterns against /services/Echo, which is where SECURITY.md says endpoint authentication lives. strip the query string before the search in all three helpers and take the first occurrence of the service context path for the service; the operation keeps the right-to-left search for the service name, since a context root can legitimately repeat it earlier in the path. the kernel dispatcher tests and UtilsParseRequestTest gain cases that fail before the change, and a webapp integration test shows that GET /services/NoSuchService?next=/axis2/services/Version/getVersion returned the Version response before and does not after. the kernel, transport/http and webapp-tests suites pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant