This repository was archived by the owner on Mar 3, 2020. It is now read-only.

Description
When downloading a file, the file appears broken on certain files. This is because the file size is being appended to the file when downloading.
Steps to reproduce:
- Upload an attachment as a text file
- Download attachment through challenge
- Look at the downloaded file, there is a number appended.
Screenshot:

Problematic code:
src/data/attachments.php
$data = readfile(Attachment::attachmentsDir.$filename);
The read file function appends the length to the end of the file. Instead it should be replaced with file_get_contents.