Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Event 4.2.12
-
None
-
None
Description
This happens in AEM 6.5.6.0 when the "templates" are used and a cq:path with a single quote in the value is passed.
Stack trace:
02.03.2021 22:46:30.427 *WARN* [172.31.0.150 [1614725190407] POST /libs/wcm/core/content/reference.json HTTP/1.1] org.apache.sling.event.impl.jobs.JobManagerImpl Query syntax wrong /jcr:root/var/eventing/jobs//element(*,slingevent:Job)[@event.job.topic = 'com/day/cq/replication/job/scene7' and not(@slingevent:finishedState) and ((@cq:path = '/content/dam/images-vrt-video/canvas/als-je-eens-wist/extra's/THUMBNAIL Corona-maakt-ons-gezin-hechter foto Ines Keygnaert.jpeg'))] order by @slingevent:created ascending org.apache.sling.api.resource.QuerySyntaxException: java.text.ParseException: Query: /jcr:root/var/eventing/jobs//element(*,slingevent:Job)[@event.job.topic = 'com/day/cq/replication/job/scene7' and not(@slingevent:finishedState) and ((@cq:path = '/content/dam/images-vrt-video/canvas/als-je-eens-wist/extra's/THUMBNAIL Corona-maakt-ons-gezin-hechter foto Ines Keygnaert.jpeg(*)'))] order by @slingevent:created ascending at org.apache.sling.jcr.resource.internal.helper.jcr.BasicQueryLanguageProvider.findResources(BasicQueryLanguageProvider.java:87) at org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.findResources(AuthenticatedResourceProvider.jav a:260) at org.apache.sling.resourceresolver.impl.helper.ResourceResolverControl.findResources(ResourceResolverControl.java:457) at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.findResources(ResourceResolverImpl.java:548) at org.apache.sling.event.impl.jobs.JobManagerImpl.findJobs(JobManagerImpl.java:523) at com.day.cq.replication.impl.queue.ReplicationQueueImpl.hasEntries(ReplicationQueueImpl.java:178) at com.day.cq.replication.impl.ReplicationStatusImpl.isPending(ReplicationStatusImpl.java:111) at com.day.cq.replication.impl.ReplicationStatusImpl.isDelivered(ReplicationStatusImpl.java:169) at com.day.cq.wcm.core.impl.reference.ActivationReferenceSearchServlet.doGet(ActivationReferenceSearchServlet.java:162) at com.day.cq.wcm.core.impl.reference.ActivationReferenceSearchServlet.doPost(ActivationReferenceSearchServlet.java:91)
Issue is at https://github.com/apache/sling-org-apache-sling-event/blob/org.apache.sling.event-4.2.12/src/main/java/org/apache/sling/event/impl/jobs/JobManagerImpl.java#L505, where "value" is not escaped.
Attachments
Issue Links
- duplicates
-
SLING-8413 JobManagerImpl.findJobs does not escape some values when running queries
- Closed
- relates to
-
SLING-9393 JobManager findJobs doesn't return hits when Templates are used
- Open