Defect #3691
closedRedmine allows two files with the same file name to be uploaded to the same issue
0%
Description
If you upload two files with the same name to an issue ticket, it allows you to do so instead of enforcing uniqueness. However, it ends up creating one file on the filesystem and has two entries in the attachments table pointed to the one physical file on the filesystem. The one file on the file system gets written over so it actually ends up being the last duplicate file attached. So if you decide to delete one of the duplicate files via the interface, you end up with an orphaned link on the ticket.
Redmine 0.8.4
Rails 2.1.2
Ruby 1.8.6
Updated by Derek McCallum over 15 years ago
I want to also clarify that you have to try to upload two documents within the same batch to replicate this issue. If you upload one document and then come back later to "update" the ticket with the second document named the same, it works without causing an issue. It appears that documents uploaded within the same batch have the same leading identiying number in the disk_filename thus allowing the issue reported above.
Updated by Jean-Philippe Lang almost 15 years ago
- Status changed from New to Closed
- Target version set to 1.0.0 (RC)
- Resolution set to Fixed
Fixed in r3511.
The 2 uploaded files are now saved under 2 physical files.