fix(launcher): harden LA11 gate evidence
This commit is contained in:
parent
accd01a008
commit
9f9c116792
7 changed files with 514 additions and 89 deletions
|
|
@ -208,10 +208,11 @@ function Set-DeterministicZipHostPlatform([string]$Path) {
|
|||
(Get-LittleEndianUInt32 $bytes ([int]$cursor)) -ne 0x02014b50) {
|
||||
throw "Generated ZIP central-directory entry is invalid: $Path"
|
||||
}
|
||||
# ZipArchive intentionally stamps the creating host (FAT on Windows,
|
||||
# Unix on Linux) in the upper byte of "version made by". Normalize it
|
||||
# to FAT; permissions are already explicit in ExternalAttributes.
|
||||
$bytes[[int]$cursor + 5] = 0
|
||||
# ZipArchive stamps the creating host (FAT on Windows, Unix on Linux)
|
||||
# in the upper byte of "version made by". Normalize to Unix so native
|
||||
# extraction honors the explicit regular-file type and 0755/0644 mode
|
||||
# bits already stored in ExternalAttributes.
|
||||
$bytes[[int]$cursor + 5] = 3
|
||||
$nameLength = Get-LittleEndianUInt16 $bytes ([int]$cursor + 28)
|
||||
$extraLength = Get-LittleEndianUInt16 $bytes ([int]$cursor + 30)
|
||||
$commentLength = Get-LittleEndianUInt16 $bytes ([int]$cursor + 32)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue