Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Won't Fix
-
Servlets Resolver 2.6.4
-
None
-
None
Description
Servlets are allowed to register even when the resource types are specified as
SLING_SERVLET_RESOURCE_TYPES + "=" + "[/test,/path]"
This is invalid because getOakPath for paths starting with "[" and ending with "]" return null. This creates an unwanted scenario where ResourceChangeListeners fail to register with a NPE. The NPE on JCR is fixed with commit : https://github.com/apache/jackrabbit-oak/commit/2e37d7a507186484e13897549681bf29b17461fc
However we should still fix this in sling, to not accept resource types which start with "[" and end with "]"
JCR code which returns null : https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/impl/NamePathMapperImpl.java#L91
Attachments
Attachments
Issue Links
- links to