pub_key.pem is written in a two-step sequence (create dir, then write file). A crash between these steps leaves the meeting in the in-memory map with no recoverable tally key. Tally .enc files are written directly to their final filename — a crash mid-write produces a corrupt file indistinguishable from a valid one.
Files: rustsystem-server/src/api/create_meeting.rs:55-62, rustsystem-server/src/tally_encrypt.rs:88
Fix: Use write-to-temp-file-then-rename (fs::rename) for both.
pub_key.pemis written in a two-step sequence (create dir, then write file). A crash between these steps leaves the meeting in the in-memory map with no recoverable tally key. Tally.encfiles are written directly to their final filename — a crash mid-write produces a corrupt file indistinguishable from a valid one.Files:
rustsystem-server/src/api/create_meeting.rs:55-62,rustsystem-server/src/tally_encrypt.rs:88Fix: Use write-to-temp-file-then-rename (
fs::rename) for both.