fix: баг в unzip() — неверное смещение compressed size (+14 вместо start+18)
Deploy drhider / validate (push) Waiting to run

This commit is contained in:
2026-07-12 15:01:33 +04:00
parent ee42865fcd
commit 9145345882
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ if _sys_path_root not in sys.path:
sys.path.insert(0, _sys_path_root) sys.path.insert(0, _sys_path_root)
# Версия приложения (меняется при изменениях) # Версия приложения (меняется при изменениях)
VERSION = "5.0.6" VERSION = "5.0.7"
def create_app(): def create_app():
+4 -2
View File
@@ -159,10 +159,12 @@ async function unzip(zb) {
while (pos < buf.byteLength - 4) { while (pos < buf.byteLength - 4) {
const sig = dv.getUint32(pos, true); const sig = dv.getUint32(pos, true);
if (sig === 0x04034b50) { if (sig === 0x04034b50) {
pos += 26; const nl = dv.getUint16(pos, true); pos += 2; const start = pos; // Начало local file header
pos += 26;
const nl = dv.getUint16(pos, true); pos += 2;
const el = dv.getUint16(pos, true); pos += 2; const el = dv.getUint16(pos, true); pos += 2;
const nm = new TextDecoder().decode(new Uint8Array(buf, pos, nl)); pos += nl + el; const nm = new TextDecoder().decode(new Uint8Array(buf, pos, nl)); pos += nl + el;
const cs = dv.getUint32(pos - nl - el + 14, true); const cs = dv.getUint32(start + 18, true); // compressed size at offset 18
files[nm] = new Blob([new Uint8Array(buf, pos, cs)]); pos += cs; files[nm] = new Blob([new Uint8Array(buf, pos, cs)]); pos += cs;
} else break; } else break;
} }