mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-11700: Possible to generate feed entries with malformed NodeRefs
* ActivityPostService checks incoming nodeRef values in JSON - they must at least work in a NodeRef constructor. * FeedTaskProcessor ignores nodeRef values that cannot be used in a NodeRef constructor. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32321 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -98,6 +98,16 @@ public class ActivityServiceImplTest extends BaseSpringTest
|
||||
{
|
||||
assertTrue(iae.getMessage().contains("activityType is a mandatory parameter"));
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
this.activityService.postActivity("org.alfresco.testActivityType1", "", "", "{ \"nodeRef\" : \"notfound\" }");
|
||||
fail("invalid post activity: bad nodeRef");
|
||||
}
|
||||
catch (IllegalArgumentException iae)
|
||||
{
|
||||
assertTrue(iae.getMessage().contains("Invalid node ref: notfound"));
|
||||
}
|
||||
}
|
||||
|
||||
public void testGetEmptySiteFeed() throws Exception
|
||||
|
Reference in New Issue
Block a user