Merged 5.2.N (5.2.1) to HEAD (5.2)

128168 adavis: MNT-16381 Transformers must validate the content stream mimetype
      - Addition of AbstractContentTransformer2.strictMimeTypeCheck(...) to check that the
        declared mimetype is the same as the Tika derived mimetype. Controlled by a new alfresco
        global property content.transformer.strict.mimetype.check (set to true by default).
      - Added the UnsupportedTransformationException to a number of transformation callers as
        they should have been handling it already.
      - Modified DifferrentMimeTypeTest to test the new strictMimeTypeCheck.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@129272 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alexandru Epure
2016-08-09 13:22:16 +00:00
parent 37cb92c8d6
commit 618ac2c7fe
8 changed files with 177 additions and 69 deletions

View File

@@ -34,10 +34,9 @@ import java.util.Set;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.content.transform.UnsupportedTransformationException;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.model.FileInfo;
import org.alfresco.service.cmr.model.FileNotFoundException;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.ContentData;
import org.alfresco.service.cmr.repository.ContentReader;
@@ -635,7 +634,7 @@ public abstract class BaseContentNode implements TemplateContent
}
}
}
catch (NoTransformerException e)
catch (NoTransformerException|UnsupportedTransformationException e)
{
// ignore
}