diff --git a/CHANGES.md b/CHANGES.md index 692cdc94f..24fd5c461 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -57,6 +57,8 @@ filenames containing spaces. * Fixed two separate bugs in KakaduNativeProcessor that both caused empty regions to appear in certain images. +* Fixed overly restrictive signature verification in KakaduDemoProcessor and + OpenJpegProcessor that could cause errors with some valid images. * Fixed TurboJpegProcessor not respecting the `processor.background_color` configuration key. * Fixed the `PurgeItemFromCache` API method not working with S3Cache and diff --git a/src/main/java/edu/illinois/library/cantaloupe/processor/codec/jpeg2000/JPEG2000MetadataReader.java b/src/main/java/edu/illinois/library/cantaloupe/processor/codec/jpeg2000/JPEG2000MetadataReader.java index 9889f82e3..0961eb586 100644 --- a/src/main/java/edu/illinois/library/cantaloupe/processor/codec/jpeg2000/JPEG2000MetadataReader.java +++ b/src/main/java/edu/illinois/library/cantaloupe/processor/codec/jpeg2000/JPEG2000MetadataReader.java @@ -113,8 +113,7 @@ private static SegmentMarker forBytes(byte[] twoBytes) { private static final byte[] JP2_SIGNATURE = new byte[] { 0x00, 0x00, 0x00, 0x0c, 0x6a, 0x50, 0x20, 0x20, 0x0d, 0x0a, - (byte) 0x87, 0x0a, 0x00, 0x00, 0x00, 0x14, 0x66, 0x74, 0x79, 0x70, - 0x6a, 0x70, 0x32 }; + (byte) 0x87, 0x0a }; private static final byte[] IPTC_UUID = new byte[] { (byte) 0x33, (byte) 0xc7, (byte) 0xa4, (byte) 0xd2, (byte) 0xb8,