v1.3.55: validate zip magic bytes on upload (UI + backend)

This commit is contained in:
“Naeel”
2026-05-04 10:57:32 +04:00
parent 4980eb4efa
commit d09348b6b9
4 changed files with 10 additions and 3 deletions
+1
View File
@@ -42,6 +42,7 @@ async function submitCreateArchive() {
if (!lang) throw new Error('language is required');
const archiveFile = document.getElementById('ca-archive-file').files[0];
if (!archiveFile) throw new Error('выберите .zip архив');
if (!archiveFile.name.toLowerCase().endsWith('.zip')) throw new Error('файл должен быть .zip архивом, не .' + archiveFile.name.split('.').pop());
var fd = new FormData();
fd.append('name', name);