[
https://issues.apache.org/jira/browse/SLING-9742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17202076#comment-17202076
]
Timothee Maret commented on SLING-9742:
---------------------------------------
Thanks [~cschneider] and [~dsuess]. I could reproduce.
The Sling security
[ContentDispositionFilter|https://github.com/apache/sling-org-apache-sling-security/blob/master/src/main/java/org/apache/sling/security/impl/ContentDispositionFilter.java#L278]
does attempt to get a jcr:content child as part of setting the content
disposition header.
According to the
[doc|https://github.com/apache/sling-org-apache-sling-api/blob/master/src/main/java/org/apache/sling/api/resource/ResourceProvider.java#L121-L140],
the ResourceProvider#getResource method must return null in case the required
resource could not be found. The DistributionServiceResourceProviderFactory
does deviate from this contract as it throws the exception that has been
reported. It's a bug in the DistributionServiceResourceProviderFactory code.
> CLONE - DistributionPublisher does not validate queue names
> -----------------------------------------------------------
>
> Key: SLING-9742
> URL: https://issues.apache.org/jira/browse/SLING-9742
> Project: Sling
> Issue Type: Bug
> Components: Content Distribution
> Affects Versions: Content Distribution Core 0.4.2
> Reporter: Dominik Süß
> Assignee: Timothee Maret
> Priority: Major
>
> ExtendedDistributionServiceResourceProvider currently fails to render json in
> case unexpected structures are mixed in (e.g. to provide resources to render
> a corresponding UI).
> To replicate this issue access the queue via http:
> /libs/sling/distribution/services/agents/publish/queues/<queueId>.json
> For the queueId use the queue id from the content-distribution UI (url below
> only valid for AEM):
> /libs/granite/distribution/content/distribution-agent.html?agentName=publish
> This causes exceptions like this:
> {code:java}
> java.lang.IllegalArgumentException: Unsupported entryId format jcr:content
> at
> org.apache.sling.distribution.journal.impl.queue.impl.EntryUtil.entryOffset(EntryUtil.java:32)
> at
> org.apache.sling.distribution.journal.impl.queue.impl.PubQueue.getEntry(PubQueue.java:126)
> at
> org.apache.sling.distribution.resources.impl.ExtendedDistributionServiceResourceProvider.getQueueProperties(ExtendedDistributionServiceResourceProvider.java:180)
> at
> org.apache.sling.distribution.resources.impl.ExtendedDistributionServiceResourceProvider.getChildResourceProperties(ExtendedDistributionServiceResourceProvider.java:81)
> at
> org.apache.sling.distribution.resources.impl.DistributionServiceResourceProvider.getInternalResourceProperties(DistributionServiceResourceProvider.java:64)
> at
> org.apache.sling.distribution.resources.impl.common.AbstractReadableResourceProvider.getResourceProperties(AbstractReadableResourceProvider.java:175)
> at
> org.apache.sling.distribution.resources.impl.common.AbstractReadableResourceProvider.getResource(AbstractReadableResourceProvider.java:79)
> at
> org.apache.sling.distribution.resources.impl.DistributionServiceResourceProviderFactory.getResource(DistributionServiceResourceProviderFactory.java:99)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)