Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1065821 - Reserved entities should not be able to be defined in a content spec
Summary: Reserved entities should not be able to be defined in a content spec
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: CCMS-Core
Version: 1.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 1.4
Assignee: Lee Newson
QA Contact:
URL:
Whiteboard:
Depends On: 1037269
Blocks: 979050
TreeView+ depends on / blocked
 
Reported: 2014-02-17 03:52 UTC by Matthew Casperson
Modified: 2014-08-04 22:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-23 23:43:52 UTC


Attachments (Terms of Use)

Description Matthew Casperson 2014-02-17 03:52:53 UTC
A number of entities are essential reserved. These include

BUILD_NAME
BUILD_DATE
BUILD_BZPRODUCT
BUILD_BZCOMPONENT
BUILD_BZVERSION
BUILD_BZKEYWORDS
BUILD_JIRA_PID 
BUILD_JIRA_CID 
BUILD_JIRA_VID
BOOKID
YEAR
TITLE
HOLDER
BZURL
BZCOMPONENT
BZPRODUCT

There is nothing currently stopping writers from manually defining these entities in a spec and (in the case of the "report a bug" link entities) using them in topics.

Manually defining these entities should result in a warning at the very least.

Comment 1 Lee Newson 2014-02-17 03:59:23 UTC
BOOKID
YEAR
TITLE
HOLDER
BZURL
BZCOMPONENT
BZPRODUCT

are fine as they are generated from the Content Spec data and won't change. Only entities prefixed with "BUILD" shouldn't be used.

Comment 2 Lee Newson 2014-02-17 05:00:33 UTC
Fixed in 1.4-SNAPSHOT build 201402171457

The validator will now throw errors when any of the reserved entities are used in the "Entities" metadata.

Comment 3 Lee Newson 2014-02-17 06:35:39 UTC
Note: This version has been deployed to the test/development server.

Comment 4 Matthew Casperson 2014-02-18 05:54:41 UTC
Confirmed that the BUILD_ entities can not be defined in a spec:

WARN:  No Subtitle specified, so a default will be used instead.
WARN:  No Abstract specified, so a default will be used instead.
ERROR: Invalid XML Entities! BUILD_BZCOMPONENT, BUILD_BZKEYWORDS, BUILD_BZPRODUCT, BUILD_BZVERSION, BUILD_DATE, BUILD_JIRA_CID, BUILD_JIRA_PID, BUILD_JIRA_VID and BUILD_NAME are reserved entities and cannot be defined.
       -> Entities = [
<!ENTITY BUILD_NAME 'something'>
<!ENTITY BUILD_DATE 'something'>
<!ENTITY BUILD_BZPRODUCT 'something'>
<!ENTITY BUILD_BZCOMPONENT 'something'>
<!ENTITY BUILD_BZVERSION 'something'>
<!ENTITY BUILD_BZKEYWORDS 'something'>
<!ENTITY BUILD_JIRA_PID 'something'>
<!ENTITY BUILD_JIRA_CID 'something'>
<!ENTITY BUILD_JIRA_VID 'something'>
]
ERROR: The Content Specification is not valid.


Note You need to log in before you can comment on or make changes to this bug.