Details
-
Bug
-
Resolution: Fixed
-
Highest
-
Insight Macro for Confluence 1.6.10
-
None
-
13
-
Severity 2 - Major
-
170
-
Description
Issue Summary
Insight Macro for Confluence plugin IMFC v1.6.10 doesn't work with IQLs having spaces in then even through the IQL validation succeeds.
Steps to Reproduce
- Have Jira + Confluence app linked
- Install IMFC v1.6.10
- Try to add the IMFC macro on a page with spaces in the IQL vs. without spaces in IQL
- For example, try IQL objectType=XXXX vs. objectType = XXXX
Expected Results
As long as the IQL is valid the macro is loaded correctly
Actual Results
- Check out this GIF to see the behaviour on the UI
- The below exception is thrown in the atlassian-confluence.log file:
2022-02-07 14:28:27,202 ERROR [http-nio-8090-exec-7] [common.error.jersey.ThrowableExceptionMapper] toResponse Uncaught exception thrown by REST service: Illegal character in query at index 66: /jira/rest/insight/1.0/iql/objects?objectSchemaId=2&iql=objectType = Employee&resultPerPage=50&page=1&includeAttributesDeep=0&includeTypeAttributes=true -- referer: https://linux-13105.prod.atl-cd.net/confluence/pages/editpage.action?pageId=950274 | url: /confluence/rest/ifc/1.0/jira-proxy | traceId: 256a898c1ae91a5f | userName: admin java.lang.IllegalArgumentException: Illegal character in query at index 66: /jira/rest/insight/1.0/iql/objects?objectSchemaId=2&iql=objectType = Employee&resultPerPage=50&page=1&includeAttributesDeep=0&includeTypeAttributes=true at java.base/java.net.URI.create(URI.java:883) at java.base/java.net.URI.resolve(URI.java:1066) at com.mindville.confluence.plugins.insight.jira.EndpointFactory$Companion.create(EndpointFactory.kt:9) at com.mindville.confluence.plugins.insight.jira.ApplicationLinkRequestClientImpl.execute(ApplicationLinkRequestClientImpl.kt:35) at com.mindville.confluence.plugins.insight.jira.ApplicationLinkRequestClientImpl.execute$default(ApplicationLinkRequestClientImpl.kt:31) at com.mindville.confluence.plugins.insight.jira.ApplicationLinkRequestClientImpl.get(ApplicationLinkRequestClientImpl.kt:23) at com.mindville.confluence.plugins.insight.api.JiraProxyResource.jiraProxyGET(JiraProxyResource.kt:36) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566)
- HAR file would return a 500 for the request:
GET https://<CONFLUENCE-BASE-URL>/rest/ifc/1.0/jira-proxy?url=%2Frest%2Finsight%2F1.0%2Fiql%2Fobjects%3FobjectSchemaId%3D2%26iql%3DobjectType%2520%253D%2520Server%26resultPerPage%3D50%26page%3D1%26includeAttributesDeep%3D0%26includeTypeAttributes%3Dtrue
Workaround
- Currently only possible workaround would be to downgrade IMFC to 1.6.9