about summary refs log tree commit diff
diff options
context:
space:
mode:
authornightpool <eg1290@gmail.com>2018-03-17 12:39:28 -0400
committerEugen Rochko <eugen@zeonfederated.com>2018-03-17 17:39:28 +0100
commit566ace2d6479c05e51dd8ce24283b8606be631de (patch)
tree92780039caccbf2343cedaba38d4879d01c74b3c
parent092f1df9d0a730df8ae6624feed3b11c321f604a (diff)
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
-rw-r--r--app/services/backup_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/backup_service.rb b/app/services/backup_service.rb
index fadc24a82..8492c1117 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