Bug 1103771
| Summary: | Introduce XML schema validation for gatein-resources.xml | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Portal Platform 6 | Reporter: | Peter Palaga <ppalaga> |
| Component: | Portal | Assignee: | Peter Palaga <ppalaga> |
| Status: | CLOSED UPSTREAM | QA Contact: | Tomas Kyjovsky <tkyjovsk> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.2.0 | CC: | epp-bugs, ppalaga |
| Target Milestone: | ER03 | ||
| Target Release: | 6.2.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
A bug in the validator code caused the gatein-resources.xml file to not be validated against the declared XML schema. The validation code has been corrected to validate the file correctly. To ensure backwards compatibility is maintained, the validation is done only for gatein-resources.xml files that use the namespace http://www.gatein.org/xml/ns/gatein_resources_1_5 or newer.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2025-02-10 03:36:00 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: | |
| Embargoed: | |||
|
Description
Peter Palaga
2014-06-02 13:54:22 UTC
https://github.com/gatein/gatein-portal/pull/863 was merged in upstream. I tested with 6.2.0.ER3 by modifying several different gatein-resources.xml configs across portal installation. I introduced changes invalid against the gatein_resources_1_5 schema and each time it was caught in GateInResourcesDeployer. Example:
ERROR [org.exoplatform.portal.resource.GateInResourcesDeployer] (MSC service thread 1-4) Could not parse or validate gatein-resources.xml in context 'eXoResources': org.xml.sax.SAXParseException; lineNumber: 29; columnNumber: 15; cvc-complex-type.2.4.a: Invalid content was found starting with element 'css-path'. One of '{"http://www.gatein.org/xml/ns/gatein_resources_1_5":css-priority, "http://www.gatein.org/xml/ns/gatein_resources_1_5":overwrite}' is expected.
In the same way I tested that no schema validation is done for older schema versions (gatein_resources_1_4 and gatein_resources_1_3).
Would the validation fixes be something we should mention for customers? XMLValidator is not something a customer would touch, so I think although this has a customer-facing impact in that customer will see validation issues now, it might not need to be called out explicitly? What do you think? Hi Jared, I definitely find this to have a customer-facing impact. There surely are schema-incompatible gatein-resources.xml out there in the wild that were silently accepted by the portal in the past. And if a customer decides to upgrade such an invalid file to the newest gatein_resources_1.5 schema (because e.g. he wants to add the new CDN loading there), he may get validation errors that he may want to get explained. I have proposed a Doc Text This product has been discontinued or is no longer tracked in Red Hat Bugzilla. |