mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
* fix(lambda): normalize backslash ZIP path separators on extraction PowerShell's Compress-Archive writes ZIP entry names with '\' separators, violating the ZIP spec (APPNOTE.TXT 4.4.17 mandates '/'). On Linux '\' is a literal filename character, so a .NET/Blazor publish archive extracted to a single flat file named "wwwroot\app.css" instead of nested directories, breaking static-file lookups under /var/task. Normalize '\' -> '/' before any path handling so such archives extract to the correct nested paths, matching how real AWS Lambda unpacks them. A trailing separator is also treated as a directory entry, since the backslash form would otherwise slip past ZipEntry.isDirectory(). The path-traversal guard now runs on the normalized name, so "..\..\evil" is still rejected. Closes #1198 * fix(lambda): warn on backslash ZIP separators instead of normalizing Real AWS Lambda does NOT normalize '\' to '/' in ZIP entry names — a PowerShell Compress-Archive entry extracts as a literal-named file. The previous normalization made Floci more forgiving than AWS, letting broken packages pass locally and fail on deploy. Replace the normalization with a clear warning that tells the developer why the backslash entry is problematic and how to repackage correctly (tar, pwsh, or dotnet lambda CLI). The traversal guard and containment check stay as-is.