Ethsim2 requests feedback on an automated security review finding for the proposed backup download resume feature. The concern is that a previously authorized resume token could potentially be used to access a new file if a backup is deleted and replaced with another file sharing the same filename.
Ethsim2 notes that Discourse’s automatically generated backup filenames include timestamps down to the second, making accidental reuse unlikely. The reported scenario requires an authenticated administrator session, a valid resume grant, and a filename collision, which typically only occurs if an admin manually uploads a backup with an existing filename. This means the filename alone does not guarantee immutable file identity.
Given that resumable downloads are disabled by default and the resume window is time-limited, Ethsim2 seeks maintainers’ opinions on whether this represents a sufficiently realistic risk to warrant implementing additional file-identity verification. They ask whether it is reasonable to accept and document this residual risk or if verification is mandatory before merging. The goal is to find a balance between security, implementation complexity, and the feature’s original purpose of enabling the resumption of interrupted large backup downloads.
I’ve received an automated security review finding on the proposed backup download resume PR:
The finding concerns the possibility of a previously authorised resume token being used after a backup has been deleted and another file uploaded under the same filename.
My understanding is that Discourse’s automatically generated backup filenames include a timestamp down to the second, making accidental reuse unlikely during normal backup creation.
The reported scenario also appears to require an authenticated administrator’s session, a still-valid resume grant and replacement of a backup under the same filename.
I recognise that manually uploaded backup files can reuse an existing filename, and therefore that the filename alone does not provide an immutable file identity.
However, I would appreciate the maintainers’ views on whether this represents a sufficiently realistic risk to require additional file-identity verification, particularly given that resumable downloads are disabled by default and the enabled resume window is time-limited.
Would it be reasonable to accept and document this residual risk, or would maintainers consider file-identity verification necessary before the feature could be merged?
I’d be interested in finding an appropriate balance between security, implementation complexity and the original aim of allowing interrupted large backup downloads to resume.