diff options
author | Dominik Stadler <centic@apache.org> | 2023-12-06 19:50:06 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2023-12-06 19:50:06 +0000 |
commit | fd9300d3b776738ce6d9cf82ced8dd149a7ebef3 (patch) | |
tree | 07f44925ce99f3e7326e13fdb498bad1c49ee345 /poi-ooxml/src/main | |
parent | c8c8130ae352d8647b03faba492732883471e8bf (diff) | |
download | poi-fd9300d3b776738ce6d9cf82ced8dd149a7ebef3.tar.gz poi-fd9300d3b776738ce6d9cf82ced8dd149a7ebef3.zip |
Mark internal classes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914408 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml/src/main')
-rw-r--r-- | poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipSecureFile.java | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipSecureFile.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipSecureFile.java index 74c543574c..fbc5781fdd 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipSecureFile.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipSecureFile.java @@ -24,6 +24,7 @@ import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipFile; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.util.Internal; import org.apache.poi.util.Removal; /** @@ -34,6 +35,7 @@ import org.apache.poi.util.Removal; * The alert limits can be globally defined via {@link #setMaxEntrySize(long)} * and {@link #setMinInflateRatio(double)}. */ +@Internal public class ZipSecureFile extends ZipFile { private static final Logger LOG = LogManager.getLogger(ZipSecureFile.class); /* package */ static double MIN_INFLATE_RATIO = 0.01d; @@ -60,7 +62,7 @@ public class ZipSecureFile extends ZipFile { /** * Sets the ratio between de- and inflated bytes to detect zipbomb. * It defaults to 1% (= 0.01d), i.e. when the compression is better than - * 1% for any given read package part, the parsing will fail indicating a + * 1% for any given read package part, the parsing will fail indicating a * Zip-Bomb. * * @param ratio the ratio between de- and inflated bytes to detect zipbomb @@ -68,13 +70,13 @@ public class ZipSecureFile extends ZipFile { public static void setMinInflateRatio(double ratio) { MIN_INFLATE_RATIO = ratio; } - + /** * Returns the current minimum compression rate that is used. - * + * * See setMinInflateRatio() for details. * - * @return The min accepted compression-ratio. + * @return The min accepted compression-ratio. */ public static double getMinInflateRatio() { return MIN_INFLATE_RATIO; @@ -106,8 +108,8 @@ public class ZipSecureFile extends ZipFile { /** * Sets the maximum file size of a single zip entry. It defaults to 4GB, * i.e. the 32-bit zip format maximum. - * - * This can be used to limit memory consumption and protect against + * + * This can be used to limit memory consumption and protect against * security vulnerabilities when documents are provided by users. * * @param maxEntrySize the max. file size of a single zip entry @@ -124,10 +126,10 @@ public class ZipSecureFile extends ZipFile { /** * Returns the current maximum allowed uncompressed file size. - * + * * See setMaxEntrySize() for details. * - * @return The max accepted uncompressed file size. + * @return The max accepted uncompressed file size. */ public static long getMaxEntrySize() { return MAX_ENTRY_SIZE; @@ -170,8 +172,8 @@ public class ZipSecureFile extends ZipFile { * Sets the maximum number of characters of text that are * extracted before an exception is thrown during extracting * text from documents. - * - * This can be used to limit memory consumption and protect against + * + * This can be used to limit memory consumption and protect against * security vulnerabilities when documents are provided by users. * * @param maxTextSize the max. file size of a single zip entry @@ -188,7 +190,7 @@ public class ZipSecureFile extends ZipFile { /** * Returns the current maximum allowed text size. - * + * * @return The max accepted text size. * @see #setMaxTextSize(long) */ |