DjangoGirls / djangogirls

Website for DjangoGirls.org
http://djangogirls.org/
BSD 3-Clause "New" or "Revised" License
462 stars 286 forks source link

Names of uploaded files should be unique #44

Closed olasitarska closed 9 years ago

olasitarska commented 9 years ago

Currently when someone uploads a file to Django Girls website in admin (as coach photo or sponsor logo), we don't change the name of the file, so it's easy to override someone elses file. We should change that.

tricoder42 commented 9 years ago

Note: It shouldn't happen by default, because Django appends random hash to conflict filename (https://docs.djangoproject.com/en/1.8/ref/files/storage/#django.core.files.storage.Storage.get_available_name), but it really happened to one organizer.

olasitarska commented 9 years ago

Good point, if someone wants to investigate that, go ahead. Otherwise I'll try next week ;)

tricoder42 commented 9 years ago

DjangoGirls uses S3 Storage which has a settings: AWS_S3_FILE_OVERWRITE https://github.com/jschneier/django-storages/blob/master/storages/backends/s3boto.py#L216

It is true by default. It should help to turn it off, but I need to test it.