Fixes ALF-11912: TagScopePropertyMethodInterceptor fails to strip out spoofed property cm:tagScopeSummary

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32862 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Brian Remmington
2011-12-19 15:54:44 +00:00
parent 2b6bd1ab73
commit f38f3d62e1

View File

@@ -124,6 +124,29 @@ public class TagScopePropertyMethodInterceptor implements MethodInterceptor
}
}
}
else if ("setProperty".equals(methodName))
{
Object[] args = invocation.getArguments();
QName propertyQName = (QName) args[1];
if (!ContentModel.PROP_TAGSCOPE_SUMMARY.equals(propertyQName))
{
ret = invocation.proceed();
}
else
{
ret = null;
}
}
else if ("setProperties".equals(methodName))
{
Object[] args = invocation.getArguments();
Map<QName, Serializable> properties = (Map<QName, Serializable>) args[1];
if (properties != null)
{
properties.remove(ContentModel.PROP_TAGSCOPE_SUMMARY);
}
ret = invocation.proceed();
}
else
{
ret = invocation.proceed();