Merged API-STRIKES-BACK (5.2.0) to HEAD (5.2)

125601 jvonka: RA-779: Sites API - create site
   - additional tests (site description & also max lengths for id, title & description)
   - fix site id validation (repeating valid chars)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@127555 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2016-06-02 21:26:16 +00:00
parent e9fa85196d
commit fb2bf792e7
3 changed files with 42 additions and 4 deletions

View File

@@ -948,7 +948,7 @@ public class SitesImpl implements Sites
}
else
{
if (! siteId.matches("[^"+SITE_ID_VALID_CHARS_PARTIAL_REGEX+"]"))
if (! siteId.matches("^["+SITE_ID_VALID_CHARS_PARTIAL_REGEX+"]+"))
{
throw new InvalidArgumentException("Invalid site id - should consist of alphanumeric/dash characters");
}