fix: harden profile imports and release dependencies

This commit is contained in:
Andy Dixon
2026-06-15 19:39:16 +01:00
parent b2fc84846c
commit 9bbd9ceccf
20 changed files with 1493 additions and 135 deletions
@@ -129,3 +129,24 @@ func TestDecryptCorruptFile(t *testing.T) {
t.Fatal("expected error for corrupt file, got nil")
}
}
func TestDecryptRejectsOversizedFile(t *testing.T) {
dir := t.TempDir()
path := filepath.Join(dir, "huge.nexus")
f, err := os.Create(path)
if err != nil {
t.Fatal(err)
}
if err := f.Truncate(maxEncryptedImportBytes + 1); err != nil {
f.Close()
t.Fatal(err)
}
if err := f.Close(); err != nil {
t.Fatal(err)
}
_, err = DecryptAndImport(path, "password")
if err == nil {
t.Fatal("expected error for oversized file, got nil")
}
}