fix: close Windows extraction namespace gaps
Reject alternate data streams, reserved Win32 device names, and trailing-dot or trailing-space aliases before internal ZIP, JVM, or native extraction writes. Preflight native archive entry lists, reconcile opened JVM outputs to partial or removed state on abnormal results, and replace hardlink-based owner markers with portable exclusive reservation plus atomic replacement while allowing direct scoped extraction to continue when marker persistence is unavailable.
This commit is contained in:
@@ -52,7 +52,13 @@ describe("PackageOutputScope", () => {
|
||||
"../foreign.mkv",
|
||||
"folder/../../foreign.mkv",
|
||||
"/absolute.mkv",
|
||||
"C:\\absolute.mkv"
|
||||
"C:\\absolute.mkv",
|
||||
"file.mkv:stream",
|
||||
"CON",
|
||||
"aux.txt",
|
||||
"folder/LPT1.mkv",
|
||||
"name.",
|
||||
"name "
|
||||
])("rejects unsafe archive entry path %s", (entryPath) => {
|
||||
const root = createRoot();
|
||||
const outputPath = path.join(root, "safe.mkv");
|
||||
|
||||
Reference in New Issue
Block a user