Bug 532092

Summary: CMSServlet.outputXML() fails to send template repeat elements; error descriptions omitted
Product: [Retired] Dogtag Certificate System Reporter: John Dennis <jdennis>
Component: Certificate ManagerAssignee: RHCS Maintainers <rhcs-maint>
Status: CLOSED EOL QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: low    
Version: 1.2CC: dpal, jgalipea, rcritten
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:08:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 531953    
Bug Blocks: 431022, 533979    

Description John Dennis 2009-10-30 15:30:14 UTC
in pki/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java

The method outputXML() is used transmit the template parameters when xml==True. However outputXML() only sends the contents of the header hash table and the fixed hash table. It does not send the array of "repeat" values in the parameter block.

This omission is most noticeable when the ERROR template is rendered. 

pki/base/common/src/com/netscape/cms/servlet/common/GenErrorTemplateFiller.java

gets the array of error descriptions via cmsReq.getErrorDescr() and inserts them into the repeat array in the template parameter block.

However because the repeat array is not included when outputXML is called to transmit an error report (e.g. error template) after a scriplet process() method is called in CMSServlet.service() which resulted in an error the error descriptions are discarded.

In other words any calls to setErrorDescription() are effectively lost and never reach the client when using XML. Fortunately at least the errorDetail field is transmitted.

Comment 1 John Dennis 2009-11-12 16:27:56 UTC
patch provided in bz #531953 solves this problem

Comment 2 Andrew Wnuk 2009-11-25 23:44:32 UTC
Patch included in in bug #533979 (attachment #373874 [details]) is committed.