Race condition in lock file creation could allow concurrent backups #3
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Race condition in lock file creation could allow concurrent backups
Priority: High
Component: backup.py
Type: Bug
Description
There's a race condition in the
set_backups_lock()function (backup.py:100-131) between checking if the lock file exists and creating it. Two processes could both check for the file, both find it doesn't exist, and both proceed to create backups simultaneously.Location
curateipsum/backup.py:109-112Current Code
Problem
Between line 109 and 110, another process could create the lock file, leading to both processes thinking they have the lock.
Proposed Solution
Use atomic file creation with exclusive flags:
Impact
High - Could cause data corruption or incomplete backups if two processes run simultaneously.