Bug 1019590 - csprocessor fails with invalid zanata values
csprocessor fails with invalid zanata values
Product: PressGang CCMS
Classification: Community
Component: CSProcessor (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 1.3
Assigned To: Lee Newson
Depends On:
  Show dependency treegraph
Reported: 2013-10-16 02:27 EDT by Lee Newson
Modified: 2013-12-03 17:16 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-12-03 17:16:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Lee Newson 2013-10-16 02:27:34 EDT
If the user has invalid values for the zanata values in csprocessor.ini then it will throw an NPE when trying to either build/assemble/preview (plus probably other commands). The error is:

         at org.jboss.pressgang.ccms.zanata.ZanataDetails.returnUrl(ZanataDetails.java:70)
         at org.jboss.pressgang.ccms.contentspec.client.commands.BuildCommand.validateServerUrl(BuildCommand.java:946)
         at org.jboss.pressgang.ccms.contentspec.client.Client.processArgs(Client.java:230)
         at org.jboss.pressgang.ccms.contentspec.client.Client.main(Client.java:109)
Comment 1 Lee Newson 2013-11-04 21:25:27 EST
Fixed in 1.3-SNAPSHOT build 201311051217

The problem was caused by how the zanata url was being generated. Since it was doing an indexOf() call on the url, if it was null then it would throw an NPE.
Comment 2 Matthew Casperson 2013-11-27 15:49:58 EST
Tested with an empty "default.url", a missing "default.url" and a "default.url" that was not a url.

Also tried with a missing "default" and an invalid "default".

None threw a NPE.

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