Fix to issue where if used is a member of more than 1000 sites it is possible to cause listSites (for a user) to pass too many results to the NodeService API (which has a fixed maximum limit of 1000 entries)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31083 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2011-10-10 13:35:55 +00:00
parent aa34a89155
commit 5140758b93

View File

@@ -1002,12 +1002,16 @@ public class SiteServiceImpl extends AbstractLifecycleBean implements SiteServic
@Override
public boolean includeAuthority(String authority)
{
String siteName = resolveSite(authority);
if (siteName == null)
if (siteNames.size() < maxResults)
{
return false;
String siteName = resolveSite(authority);
if (siteName == null)
{
return false;
}
return siteNames.add(siteName);
}
return siteNames.add(siteName);
return false;
}}, maxResults);
if (siteNames.isEmpty())
{