[
https://issues.apache.org/jira/browse/SLING-12124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17781586#comment-17781586
]
Sagar Miglani commented on SLING-12124:
---------------------------------------
Initial PR: [https://github.com/apache/sling-org-apache-sling-engine/pull/40]
cc: [~cziegeler]
> Inconsistent handling of empty selectors
> ----------------------------------------
>
> Key: SLING-12124
> URL: https://issues.apache.org/jira/browse/SLING-12124
> Project: Sling
> Issue Type: Bug
> Components: Engine
> Affects Versions: Engine 2.15.6
> Reporter: Sagar Miglani
> Priority: Major
> Attachments: inconsistent_empty_selectors.patch
>
>
> In accordance with the code found
> [here|https://github.com/apache/sling-org-apache-sling-engine/blob/master/src/main/java/org/apache/sling/engine/impl/request/RequestData.java#L563],
> empty selectors are explicitly disallowed. However, the [parsing of
> selectors|https://github.com/apache/sling-org-apache-sling-engine/blob/master/src/main/java/org/apache/sling/engine/impl/request/SlingRequestPathInfo.java#L93-L95]
> is making request with all empty selector as valid.
> i.e:
> Requests will empty selectors like: "/test/resource/path..a...html" are
> invalid
> While requests with all empty selectos "/test/resource/path.....html" are
> valid
> Which indicates an inconsistent behaviour.
> Attached tests to demonstrate the same ([^inconsistent_empty_selectors.patch])
--
This message was sent by Atlassian Jira
(v8.20.10#820010)