mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-21 03:55:07 +01:00
Add entropy to download filenames (#6811)
pretty quick fix, and with the 1 week expiration i don't think we need to be too worried about the existing files closes #6798
This commit is contained in:
parent
092f1df9d0
commit
566ace2d64
@ -49,7 +49,7 @@ class BackupService < BaseService
|
||||
end
|
||||
end
|
||||
|
||||
archive_filename = ['archive', Time.now.utc.strftime('%Y%m%d%H%M%S'), SecureRandom.hex(2)].join('-') + '.tar.gz'
|
||||
archive_filename = ['archive', Time.now.utc.strftime('%Y%m%d%H%M%S'), SecureRandom.hex(16)].join('-') + '.tar.gz'
|
||||
|
||||
@backup.dump = ActionDispatch::Http::UploadedFile.new(tempfile: tmp_file, filename: archive_filename)
|
||||
@backup.processed = true
|
||||
|
Loading…
Reference in New Issue
Block a user