Skip to content

Non-atomic file writes for critical data #33

Closed

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.

Activity

  1. added this to the v2.1 milestone on Mar 4, 2026
  2. HellFelix commented on Apr 12, 2026

    @HellFelix
    CollaboratorAuthor

    Fixed with 880d241. Merged to stage with #61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    mediumMedium priorityreliabilityRelated to the reliability of the system

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions