From 566ace2d6479c05e51dd8ce24283b8606be631de Mon Sep 17 00:00:00 2001 From: nightpool Date: Sat, 17 Mar 2018 12:39:28 -0400 Subject: [PATCH] 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 --- app/services/backup_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/backup_service.rb b/app/services/backup_service.rb index fadc24a82c..8492c11176 100644 --- a/app/services/backup_service.rb +++ b/app/services/backup_service.rb @@ -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