-
CSR
-
Resolution: Approved
-
P3
-
None
-
behavioral
-
minimal
-
Since we are adding back the old functionality of allowing opening of an existing zip file that contains entries with "." or ".." in its name elements , the compatibility risk will be minimal.
-
System or security property
-
Implementation
Summary
Introduce a new system property for JDK 17 and 11 Updates (only) to revert newly added restrictions in the Zip FS provider which by default now rejects ZIP files that contain entries with "." or ".." in name elements.
Problem
As part of fix for JDK-8251329 , restrictions were added to ZipFS provider to throw an exception if opening a ZIP file that contained entries with "." or ".." in its name elements.This behavioural change may be problematic in older envionments where modification of such ZIP files may be difficult.
Solution
Introduce a new system property which can be used to revert the behavioural change introduced via JDK-8251329.The restrictions remain on by default.
Specification
The name of an entry within a ZIP file may contain an optional relative path( a sequence of name elements separated by a forward slash) and therefore may contain name elements of "." or ".." . Note that Zip FS the restriction is due to Zip FS treating a Zip File as a file system.
Introduce a new system property: jdk.nio.zipfs.allowDotZipEntry which can be used to remove the restriction. Running with -Djdk.nio.zipfs.allowDotZipEntry or -Djdk.nio.zipfs.allowDotZipEntry=true reverts to long standing behaviour.
- csr of
-
JDK-8302992 (zipfs) Introduce new system property to turn off JDK-8251329 restrictions
- Resolved