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)>
|
<#escape x as jsonUtils.encodeJSONString(x)>
|
||||||
{
|
{
|
||||||
|
<#if !errorMessage??>
|
||||||
"items":
|
"items":
|
||||||
[
|
[
|
||||||
<#list items as item>
|
<#list items as item>
|
||||||
@@ -40,5 +41,8 @@
|
|||||||
}<#if item_has_next>,</#if>
|
}<#if item_has_next>,</#if>
|
||||||
</#list>
|
</#list>
|
||||||
]
|
]
|
||||||
|
<#else>
|
||||||
|
"errorMessage": "${errorMessage}"
|
||||||
|
</#if>
|
||||||
}
|
}
|
||||||
</#escape>
|
</#escape>
|
@@ -161,6 +161,9 @@ public class RMSearchGet extends DeclarativeWebScript
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
|
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
|
// Get the site id and confirm it is valid
|
||||||
Map<String, String> templateVars = req.getServiceMatch().getTemplateVars();
|
Map<String, String> templateVars = req.getServiceMatch().getTemplateVars();
|
||||||
@@ -216,8 +219,12 @@ public class RMSearchGet extends DeclarativeWebScript
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return model
|
// Return model
|
||||||
Map<String, Object> model = new HashMap<String, Object>(1);
|
|
||||||
model.put("items", items);
|
model.put("items", items);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
model.put("errorMessage", ex.toString());
|
||||||
|
}
|
||||||
return model;
|
return model;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user