Skip to content

Non-atomic file writes for critical data #33

@HellFelix

Description

@HellFelix

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    mediumMedium priorityreliabilityRelated to the reliability of the system

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions