| Summary: | Invalid encoding in gadget source not handled properly | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Portal Platform 5 | Reporter: | Miroslav Cupák <mcupak> | ||||||||
| Component: | Portal | Assignee: | Peter Palaga <ppalaga> | ||||||||
| Status: | MODIFIED --- | QA Contact: | |||||||||
| Severity: | medium | Docs Contact: | |||||||||
| Priority: | medium | ||||||||||
| Version: | 5.2.1.GA | CC: | epp-bugs, theute, tkyjovsk | ||||||||
| Target Milestone: | --- | ||||||||||
| Target Release: | 5.2.x | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||
| Doc Text: |
Cause: When OpenSocial gadget XML definition had encoding other than the default encoding of the running VM in its XML declaration, an "Unknown error" was presented to the user.
Consequence: Gadget was not saved.
Fix: The declared encoding is detected, validated and used to store the XML document.
Result: An error message is presented to the user only if the XML document contains an unsupported encoding. Otherwise the there is no error message and the document is stored properly.
|
Story Points: | --- | ||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 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: |
|
||||||||||
|
Description
Miroslav Cupák
2012-03-14 01:51:51 UTC
Created attachment 569828 [details]
Screenshot of the error message.
Created attachment 569829 [details]
Invalid encoding error from the server log.
Created attachment 569832 [details]
Invalid prolog content error from the server log.
Fix described inhttps://issues.jboss.org/browse/GTNPORTAL-2496
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
Cause: When OpenSocial gadget XML definition had encoding other than the default encoding of the running VM in its XML declaration, an "Unknown error" was presented to the user.
Consequence: Gadget was not saved.
Fix: The declared encoding is detected, validated and used to store the XML document.
Result: An error message is presented to the user only if the XML document contains an unsupported encoding. Otherwise the there is no error message and the document is stored properly.
I verified that nonexistent encoding is handled properly and a proper message is displayed. However, there seems to be a problem with gadgets using "UTF-16". Such encoding passes validation now and the gadget is saved, but it cannot be displayed by the portal. If you drag it on dashboard, you simply don't see any gadget window on the page, but if you change the encoding and go back to dashboard, the gadget is visible. If the gadget is placed on a portal page (not dashboard), the following JS error is logged: "Uncaught TypeError: Cannot read property 'height' of undefined (merged.js:144)". Observed with a simple "Hello world" gadget. AFAIK it is not a regression ? If it's not please target 5.2.x @theute: No, this is not a regression. Setting target to 5.2.x. @mcupak: Thank you for your consequent checks. I could track the problem down to JCR not including the charset in the response's Content-Type. I am going to ask JCR people if that can be fixed. |