You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (Jira)" <ji...@apache.org> on 2022/04/01 10:29:00 UTC

[jira] [Closed] (SLING-9740) Invalid handling of requests containing URL path parameters

     [ https://issues.apache.org/jira/browse/SLING-9740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler closed SLING-9740.
-----------------------------------

> Invalid handling of requests containing URL path parameters
> -----------------------------------------------------------
>
>                 Key: SLING-9740
>                 URL: https://issues.apache.org/jira/browse/SLING-9740
>             Project: Sling
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: Engine 2.7.2
>            Reporter: Lars Krapf
>            Assignee: Carsten Ziegeler
>            Priority: Major
>             Fix For: Engine 2.9.0
>
>
> {{RequestData.initResource()}} has support for requests containing URL-path parameters (e.g. /path;foo=bar/path2;bar=baz/). It will split at the first semicolon, and concatenate this to the {{request.getPathInfo()}} (not containing such parameters). See [RequestData.java|https://github.com/apache/sling-org-apache-sling-engine/blob/master/src/main/java/org/apache/sling/engine/impl/request/RequestData.java#L232]. However, this handling is incomplete as it only covers the case where one such parameter is added at the end of the request, but path parameters can be added to *any* path segment, leading to unexpected results.
> E.g. the following request:
> http://localhost:4502/content;foo=bar/we-retail;bar=baz/us/en.html
> will result in {{path}} being:
> /content/we-retail/us/en.html;foo=bar/we-retail;bar=baz/us/en.html
> This gets especially confusing when path normalization happens in conjunction with path parameters:
> http://localhost/content/we-retail.html/..;/..;/bin/querybuilder.json.css?path=/home/users
> will result in {{path}} being:
> /bin/querybuilder.json.css;/..;/bin/querybuilder.json.css
> after the concatenation. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)