diff options
author | Tim Allison <tallison@apache.org> | 2023-09-20 20:32:59 +0000 |
---|---|---|
committer | Tim Allison <tallison@apache.org> | 2023-09-20 20:32:59 +0000 |
commit | 99117381e59d9a7f2abe27784009358c672c0ae3 (patch) | |
tree | 190b7ef61d91f9579bd7605d1a2c45cf142ea674 /poi-integration | |
parent | ce919673c4e935e8c756c91938f973d5c9a23ddb (diff) | |
download | poi-99117381e59d9a7f2abe27784009358c672c0ae3.tar.gz poi-99117381e59d9a7f2abe27784009358c672c0ae3.zip |
Bug47950 -- make stream/directory name lookup in OLE2 case insensitive
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912438 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-integration')
-rw-r--r-- | poi-integration/src/test/java/org/apache/poi/stress/HPSFFileHandler.java | 2 | ||||
-rw-r--r-- | poi-integration/src/test/java/org/apache/poi/stress/POIXMLDocumentHandler.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/poi-integration/src/test/java/org/apache/poi/stress/HPSFFileHandler.java b/poi-integration/src/test/java/org/apache/poi/stress/HPSFFileHandler.java index 705bed2e53..9edd92306f 100644 --- a/poi-integration/src/test/java/org/apache/poi/stress/HPSFFileHandler.java +++ b/poi-integration/src/test/java/org/apache/poi/stress/HPSFFileHandler.java @@ -101,7 +101,7 @@ public class HPSFFileHandler extends POIFSFileHandler { private static boolean hasPropertyStream(POIFSFileSystem poifs, String streamName) throws IOException { DirectoryNode root = poifs.getRoot(); - if (!root.hasEntry(streamName)) { + if (!root.hasEntryCaseInsensitive(streamName)) { return false; } try (DocumentInputStream dis = root.createDocumentInputStream(streamName)) { diff --git a/poi-integration/src/test/java/org/apache/poi/stress/POIXMLDocumentHandler.java b/poi-integration/src/test/java/org/apache/poi/stress/POIXMLDocumentHandler.java index 88b269b687..6dd78b1a6a 100644 --- a/poi-integration/src/test/java/org/apache/poi/stress/POIXMLDocumentHandler.java +++ b/poi-integration/src/test/java/org/apache/poi/stress/POIXMLDocumentHandler.java @@ -40,7 +40,7 @@ public final class POIXMLDocumentHandler { protected static boolean isEncrypted(InputStream stream) throws IOException { if (FileMagic.valueOf(stream) == FileMagic.OLE2) { try (POIFSFileSystem poifs = new POIFSFileSystem(stream)) { - if (poifs.getRoot().hasEntry(Decryptor.DEFAULT_POIFS_ENTRY)) { + if (poifs.getRoot().hasEntryCaseInsensitive(Decryptor.DEFAULT_POIFS_ENTRY)) { return true; } } |