Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2024-03-18 17:58:54 +00:00
parent 66736a1775
commit ea1261a218
433 changed files with 3684 additions and 1810 deletions

View file

@ -118,8 +118,12 @@ function decrypt(/*Buffer*/ data, /*Object*/ header, /*String, Buffer*/ pwd) {
// 2. decrypt salt what is always 12 bytes and is a part of file content
const salt = decrypter(data.slice(0, 12));
// 3. does password meet expectations
if (salt[11] !== header.crc >>> 24) {
// if bit 3 (0x08) of the general-purpose flags field is set, check salt[11] with the high byte of the header time
// 2 byte data block (as per Info-Zip spec), otherwise check with the high byte of the header entry
const verifyByte = ((header.flags & 0x8) === 0x8) ? header.timeHighByte : header.crc >>> 24;
//3. does password meet expectations
if (salt[11] !== verifyByte) {
throw "ADM-ZIP: Wrong Password";
}