mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-825 (Records Search by XSS query works wrong)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@54092 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<#escape x as jsonUtils.encodeJSONString(x)>
|
||||
{
|
||||
<#if !errorMessage??>
|
||||
"items":
|
||||
[
|
||||
<#list items as item>
|
||||
@@ -40,5 +41,8 @@
|
||||
}<#if item_has_next>,</#if>
|
||||
</#list>
|
||||
]
|
||||
<#else>
|
||||
"errorMessage": "${errorMessage}"
|
||||
</#if>
|
||||
}
|
||||
</#escape>
|
@@ -161,6 +161,9 @@ public class RMSearchGet extends DeclarativeWebScript
|
||||
*/
|
||||
@Override
|
||||
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
|
||||
{
|
||||
Map<String, Object> model = new HashMap<String, Object>(1);
|
||||
try
|
||||
{
|
||||
// Get the site id and confirm it is valid
|
||||
Map<String, String> templateVars = req.getServiceMatch().getTemplateVars();
|
||||
@@ -216,8 +219,12 @@ public class RMSearchGet extends DeclarativeWebScript
|
||||
}
|
||||
|
||||
// Return model
|
||||
Map<String, Object> model = new HashMap<String, Object>(1);
|
||||
model.put("items", items);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
model.put("errorMessage", ex.toString());
|
||||
}
|
||||
return model;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user