The view functions in waliki.attachments use endswith to get the database object corresponding to a attachment. If one uploads two attachments with - for example - the names a.pdf and aa.pdf and then tries to download the former there's an error because there are now two entries in the database where the filename ends with a.pdf.
Coverage increased (+0.01%) to 71.131% when pulling 644d932fb4daf84bec949b66e9210e9ac795faa1 on wagnerflo:fix-attachments into 8c2969113f58803c1b842f9f9c88afd1234459c0 on mgaitan:master.
The view functions in
waliki.attachments
useendswith
to get the database object corresponding to a attachment. If one uploads two attachments with - for example - the namesa.pdf
andaa.pdf
and then tries to download the former there's an error because there are now two entries in the database where the filename ends witha.pdf
.