| Summary: | Resource generated by renderResponse.createResourceURL() is escaped when used in script | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Portal Platform 5 | Reporter: | Michal Vanco <mvanco> | ||||||||||
| Component: | unspecified | Assignee: | Matt Wringe <mwringe> | ||||||||||
| Status: | CLOSED NEXTRELEASE | QA Contact: | |||||||||||
| Severity: | high | Docs Contact: | |||||||||||
| Priority: | high | ||||||||||||
| Version: | 5.2.0.ER06 | CC: | epp-bugs, mvanco, mvecera | ||||||||||
| Target Milestone: | --- | Keywords: | Regression | ||||||||||
| Target Release: | 5.2.0.CR01 | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| URL: | http://jira.jboss.org/jira/browse/JBEPP-1358 | ||||||||||||
| Whiteboard: | |||||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||||
| Doc Text: | Story Points: | --- | |||||||||||
| Clone Of: | Environment: |
EPP5.2.0 ER06
|
|||||||||||
| Last Closed: | 2011-11-13 21:35:47 UTC | Type: | Bug | ||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||
| Documentation: | --- | CRM: | |||||||||||
| Verified Versions: | Category: | --- | |||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
| Attachments: |
|
||||||||||||
Attachment: Added: resource-5.1.0-GA.png Attachment: Added: resource-5.2.0-ER06.png Attachment: Added: resource-sample-1.0.0-SNAPSHOT.war Link: Added: This issue is related to JBQA-5503 I've tried with GateIn trunk now and all examples worked properly, below URLs were generated in sample portlet: /portal/classic/sitemap?portal:componentId=7ee612af-03d8-4cca-81e5-c858fb8dbe28&portal:windowState=normal&portal:cacheLevel=PAGE&portal:type=resource&portal:portletMode=view&portal:isSecure=false /portal/classic/sitemap?portal:componentId=7ee612af-03d8-4cca-81e5-c858fb8dbe28&portal:windowState=normal&portal:cacheLevel=PAGE&portal:type=resource&portal:portletMode=view&portal:isSecure=false /portal/classic/sitemap?portal:componentId=7ee612af-03d8-4cca-81e5-c858fb8dbe28&portal:windowState=normal&portal:resourceID=resourceAjax&portal:cacheLevel=PAGE&portal:type=resource&portal:portletMode=view It says that URL with extra amp; was handled properly as resource. So this seems to be problem only in EPP. Attached screen from gatein trunk (11-11-11), all 3 samples works. Attachment: Added: resource-GateIn-trunk-11-11-11.png Release Notes Docs Status: Added: Not Required |
Steps to Reproduce: Use attached portlet project_key: JBEPP There a scenario with resource which used to work at 5.1.0 GA. Resource is created by ResourceURL resource2 = renderResponse.createResourceURL(); and then used in script element, for example: document.getElementById('mylink').href='<%= resource2 %>'; Resource generated this way contains extra amp; after & and it causes that serveResource method isn't called at all because invalid request. Result in combination with JS/ajax can be that whole portal page is included as resource instead of requested content. Attached portlet reproduce the issue (works well on 5.1.0 GA, fails on 5.2.0) Btw. there is also option that doesn't work at both 5.1.0 and 5.2.0 -> resource created by portlet:resourceURL var="res" and then used with ${res} at some script element (extra amp; is added as well) - this is second scenario at portlet. Feel free to ask if there is anything unclear