diff --git a/services-camel-app/src/main/java/edu/unc/lib/boxc/services/camel/images/ImageDerivativeProcessor.java b/services-camel-app/src/main/java/edu/unc/lib/boxc/services/camel/images/ImageDerivativeProcessor.java index 418f91a248..4ac0a39f5a 100644 --- a/services-camel-app/src/main/java/edu/unc/lib/boxc/services/camel/images/ImageDerivativeProcessor.java +++ b/services-camel-app/src/main/java/edu/unc/lib/boxc/services/camel/images/ImageDerivativeProcessor.java @@ -19,7 +19,8 @@ public class ImageDerivativeProcessor implements Processor { private static final Pattern MIMETYPE_PATTERN = Pattern.compile("^(image.*$|application.*?(photoshop|psd)$)"); - private static final Pattern DISALLOWED_PATTERN = Pattern.compile(".*(vnd\\.fpx|x-icon|x-raw-panasonic).*"); + private static final Pattern DISALLOWED_PATTERN = + Pattern.compile(".*(vnd\\.fpx|x-icon|x-raw-panasonic|vnd\\.microsoft\\.icon).*"); /** * Returns true if the subject of the exchange is a binary which diff --git a/services-camel-app/src/test/java/edu/unc/lib/boxc/services/camel/images/ImageDerivativeProcessorTest.java b/services-camel-app/src/test/java/edu/unc/lib/boxc/services/camel/images/ImageDerivativeProcessorTest.java index 5da7eba5dd..72e5138a57 100644 --- a/services-camel-app/src/test/java/edu/unc/lib/boxc/services/camel/images/ImageDerivativeProcessorTest.java +++ b/services-camel-app/src/test/java/edu/unc/lib/boxc/services/camel/images/ImageDerivativeProcessorTest.java @@ -73,4 +73,11 @@ public void testAllowedImageTypePhotoshop() { assertTrue(ImageDerivativeProcessor.allowedImageType(exchange)); } + + @Test + public void testAllowedImageTypeMicrosoft() { + when(messageIn.getHeader(CdrFcrepoHeaders.CdrBinaryMimeType)).thenReturn("image/vnd.microsoft.icon"); + + assertFalse(ImageDerivativeProcessor.allowedImageType(exchange)); + } }