mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
75035: Merged WAT2 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud) 71719: Changed the Raise event test to a POST from a GET git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@75363 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -41,7 +41,7 @@ import org.springframework.util.StringUtils;
|
||||
* @author Gethin James
|
||||
* @since 5.0
|
||||
*/
|
||||
public class RaiseBrowserEventGet extends AbstractWebScript
|
||||
public class RaiseBrowserEventPost extends AbstractWebScript
|
||||
{
|
||||
private EventPublisher eventPublisher;
|
||||
private SiteService siteService;
|
||||
@@ -79,13 +79,22 @@ public class RaiseBrowserEventGet extends AbstractWebScript
|
||||
action = templateVars.get("action");
|
||||
}
|
||||
|
||||
String attributes = req.getParameter("attributes");
|
||||
String attributes = req.getContent().getContent();
|
||||
if (attributes != null)
|
||||
{
|
||||
if (!validJsonMap(attributes))
|
||||
if (StringUtils.hasText(attributes))
|
||||
{
|
||||
throw new WebScriptException(Status.STATUS_BAD_REQUEST, "Invalid JSON Object: " + attributes);
|
||||
if (!validJsonMap(attributes))
|
||||
{
|
||||
throw new WebScriptException(Status.STATUS_BAD_REQUEST, "Invalid JSON Object: " + attributes);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//No valid attributes passed in so reset it
|
||||
attributes = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (StringUtils.hasText(component) && StringUtils.hasText(action))
|
Reference in New Issue
Block a user