Skip Navigation and Search to Content

Search ConcourseSuite Enterprise Edition - Tickets - Concursive Corporation

Main Content

ConcourseSuite Enterprise Edition

Ticket # 9 Details

Ticket Information
Entered Jol B. - 5/9/2008 1:50 AM
Last Modified Jol B. - 5/9/2008 1:50 AM
Classification
Issue ProcessDocument (document upload). bad credential s cannot get message from invalid session .

Concourse ent edn 5.0.5. SVN version 7801. Checkout May 8, 2008

org.aspcfs.modules.service.actions.ProcessDocument.java:

1. Issue: When http-xml api request has bad credentials we get stack trace because system cant find error messages in session.
To reproduce this send a correctly formatted http request to this url (ProcessDocument.do) and omit 'code'

The source code tries to retrieve system status from session, but session is invalidated. CUSA have a TODO above that might fix this in future.
there is no session or system status does not exist in session for a scripting xml-rpc-http raw-post like we do from Thunderverse

Code fix:
Therefore we need to substitute systemStatus to stop a runtime exception
We keep error label keys to minumise code change in this class
Line: 116. Change one line of code:

// Thunderverse / CANZ:
// Issue: If there is an auth problem: Try retrieve system status from session, but session is invalidated. CUSA have a TODO above that might fix this.
// there is no session or system status does not exist in session for a scripting xml-rpc-http raw-post like we do from Thunderverse
// Therefore we need to substitute systemStatus to stop a runtime exception
// SystemStatus systemStatus = this.getSystemStatus(context);
SystemStatusWorkaroundForProcessDocument systemStatus = new SystemStatusWorkaroundForProcessDocument();

if (!proceed) {
errors.put(
"authError", systemStatus.getLabel(
"object.validation.noAuthorization"));
}

== add new class: ==
package org.aspcfs.modules.service.actions;

import java.util.HashMap;

public class SystemStatusWorkaroundForProcessDocument {

private static final String ENCOUNTERED_A_PROBLEM = "ProcessDocument encountered a problem. Please check all the post parameters.";
private HashMap<String, String> map;

protected SystemStatusWorkaroundForProcessDocument() {

this.map = new HashMap<String, String>();

putKeyValue("object.validation.noAuthorization");
putKeyValue("object.validation.objectTypeRequired");
putKeyValue("object.validation.objectIdNotSpecified");
putKeyValue("object.validation.required");
putKeyValue("object.validation.incorrectFileName");

}

private void putKeyValue (String keyAndValue) {
this.map.put(keyAndValue, keyAndValue);
}

protected String getLabel(String key) {
String value = map.get(key);
return (value == null) ? ENCOUNTERED_A_PROBLEM : value;
}

}
Category Blocker (prevents feature)
Severity Normal
Assignment
Priority  
Assigned To
Resolution
Solution  
File Attachments
No files attached.

Ticket Log History
Jol B. 5/9/2008 1:50 AM [ Ticket Opened ]
Jol B. 5/9/2008 1:50 AM [ Ticket is unassigned ]
Jol B. 5/9/2008 1:50 AM [ Severity set to Normal ]
Distribution List
No recipients.