From f38f3d62e1f88f4e1c01cc217d06f163a170805c Mon Sep 17 00:00:00 2001 From: Brian Remmington Date: Mon, 19 Dec 2011 15:54:44 +0000 Subject: [PATCH] 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 --- .../TagScopePropertyMethodInterceptor.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/source/java/org/alfresco/repo/tagging/TagScopePropertyMethodInterceptor.java b/source/java/org/alfresco/repo/tagging/TagScopePropertyMethodInterceptor.java index 47e027eb86..d62891dafd 100644 --- a/source/java/org/alfresco/repo/tagging/TagScopePropertyMethodInterceptor.java +++ b/source/java/org/alfresco/repo/tagging/TagScopePropertyMethodInterceptor.java @@ -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 properties = (Map) args[1]; + if (properties != null) + { + properties.remove(ContentModel.PROP_TAGSCOPE_SUMMARY); + } + ret = invocation.proceed(); + } else { ret = invocation.proceed();