Sagar Miglani created SLING-12124:
-------------------------------------
Summary: Inconsistent handling of emtpy 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
Attachments: inconsistent_emtpy_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 emtpy 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_emtpy_selectors.patch])
--
This message was sent by Atlassian Jira
(v8.20.10#820010)