From 64fc8d2b077c76530f59f4da173659982caa9964 Mon Sep 17 00:00:00 2001 From: Daniel Hunsaker Date: Sat, 17 Mar 2018 01:39:14 -0600 Subject: [PATCH 01/12] [Nanobox] Stream backups to the warehouse (#6799) The `curl` docs are terrible. Use `-X POST -T` instead of `--data-binary`, to avoid loading entire backups into memory _before_ transferring to the warehouse, and just stream the data across as it comes in. --- boxfile.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boxfile.yml b/boxfile.yml index 70774dac92..aa2003a1b7 100644 --- a/boxfile.yml +++ b/boxfile.yml @@ -195,7 +195,7 @@ data.db: command: | PGPASSWORD=${DATA_DB_PASS} pg_dump -U ${DATA_DB_USER} -w -Fc -O gonano | gzip | - curl -k -H "X-AUTH-TOKEN: ${WAREHOUSE_DATA_HOARDER_TOKEN}" https://${WAREHOUSE_DATA_HOARDER_HOST}:7410/blobs/backup-${HOSTNAME}-$(date -u +%Y-%m-%d.%H-%M-%S).sql.gz --data-binary @- && + curl -k -H "X-AUTH-TOKEN: ${WAREHOUSE_DATA_HOARDER_TOKEN}" https://${WAREHOUSE_DATA_HOARDER_HOST}:7410/blobs/backup-${HOSTNAME}-$(date -u +%Y-%m-%d.%H-%M-%S).sql.gz -X POST -T - >&2 curl -k -s -H "X-AUTH-TOKEN: ${WAREHOUSE_DATA_HOARDER_TOKEN}" https://${WAREHOUSE_DATA_HOARDER_HOST}:7410/blobs/ | sed 's/,/\n/g' | grep ${HOSTNAME} | @@ -215,7 +215,7 @@ data.redis: - id: backup schedule: '0 3 * * *' command: | - curl -k -H "X-AUTH-TOKEN: ${WAREHOUSE_DATA_HOARDER_TOKEN}" https://${WAREHOUSE_DATA_HOARDER_HOST}:7410/blobs/backup-${HOSTNAME}-$(date -u +%Y-%m-%d.%H-%M-%S).rdb --data-binary @/data/var/db/redis/dump.rdb && + curl -k -H "X-AUTH-TOKEN: ${WAREHOUSE_DATA_HOARDER_TOKEN}" https://${WAREHOUSE_DATA_HOARDER_HOST}:7410/blobs/backup-${HOSTNAME}-$(date -u +%Y-%m-%d.%H-%M-%S).rdb -X POST -T /data/var/db/redis/dump.rdb >&2 curl -k -s -H "X-AUTH-TOKEN: ${WAREHOUSE_DATA_HOARDER_TOKEN}" https://${WAREHOUSE_DATA_HOARDER_HOST}:7410/blobs/ | sed 's/,/\n/g' | grep ${HOSTNAME} | @@ -236,7 +236,7 @@ data.storage: schedule: '0 3 * * *' command: | tar cz -C /data/var/db/unfs/ . | - curl -k -H "X-AUTH-TOKEN: ${WAREHOUSE_DATA_HOARDER_TOKEN}" https://${WAREHOUSE_DATA_HOARDER_HOST}:7410/blobs/backup-${HOSTNAME}-$(date -u +%Y-%m-%d.%H-%M-%S).tgz --data-binary @- && + curl -k -H "X-AUTH-TOKEN: ${WAREHOUSE_DATA_HOARDER_TOKEN}" https://${WAREHOUSE_DATA_HOARDER_HOST}:7410/blobs/backup-${HOSTNAME}-$(date -u +%Y-%m-%d.%H-%M-%S).tgz -X POST -T - >&2 curl -k -s -H "X-AUTH-TOKEN: ${WAREHOUSE_DATA_HOARDER_TOKEN}" https://${WAREHOUSE_DATA_HOARDER_HOST}:7410/blobs/ | sed 's/,/\n/g' | grep ${HOSTNAME} | From f0cd957c7a8a53dea2eb08a45578084b4d8bb5b4 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Sat, 17 Mar 2018 20:35:13 +0900 Subject: [PATCH 02/12] Cache HTML page with Service Worker (#6802) This is the first step to make Mastodon work offline. It is also required by Chromium to trigger Web Manifest automated install prompt. --- .../mastodon/service_worker/entry.js | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/service_worker/entry.js b/app/javascript/mastodon/service_worker/entry.js index eea4cfc3c2..ad933b95ee 100644 --- a/app/javascript/mastodon/service_worker/entry.js +++ b/app/javascript/mastodon/service_worker/entry.js @@ -1,10 +1,30 @@ import './web_push_notifications'; +function fetchRoot() { + return fetch('/', { credentials: 'include' }); +} + // Cause a new version of a registered Service Worker to replace an existing one // that is already installed, and replace the currently active worker on open pages. self.addEventListener('install', function(event) { - event.waitUntil(self.skipWaiting()); + const promises = Promise.all([caches.open('mastodon-web'), fetchRoot()]); + const asyncAdd = promises.then(([cache, root]) => cache.put('/', root)); + + event.waitUntil(asyncAdd); }); self.addEventListener('activate', function(event) { event.waitUntil(self.clients.claim()); }); +self.addEventListener('fetch', function(event) { + const url = new URL(event.request.url); + + if (url.pathname.startsWith('/web/')) { + event.respondWith(fetchRoot().then(response => { + if (response.ok) { + return response; + } + + throw null; + }).catch(() => caches.match('/'))); + } +}); From ca7e6a6d2ec2310fd026f2694580f839b4124dd2 Mon Sep 17 00:00:00 2001 From: trwnh Date: Sat, 17 Mar 2018 06:35:35 -0500 Subject: [PATCH 03/12] Properly center .nothing-here (#6787) (#6788) Apply "margin: 0 auto;" at line 443 to fix issue #6787 --- app/javascript/styles/mastodon/accounts.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/app/javascript/styles/mastodon/accounts.scss b/app/javascript/styles/mastodon/accounts.scss index 873963c904..dd82ab375e 100644 --- a/app/javascript/styles/mastodon/accounts.scss +++ b/app/javascript/styles/mastodon/accounts.scss @@ -440,6 +440,7 @@ text-align: center; padding: 60px 0; padding-top: 55px; + margin: 0 auto; cursor: default; } From b88fcd53f711673b21e5ff4a547dbf929866a2ee Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Sat, 17 Mar 2018 20:37:58 +0900 Subject: [PATCH 04/12] Upgrade Paperclip to version 6.0.0 (#6754) --- Gemfile | 4 ++-- Gemfile.lock | 29 ++++++++++++++++++----------- config/initializers/paperclip.rb | 3 +-- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/Gemfile b/Gemfile index 3fce2ddc75..54fcabb05a 100644 --- a/Gemfile +++ b/Gemfile @@ -13,11 +13,11 @@ gem 'pg', '~> 0.20' gem 'pghero', '~> 1.7' gem 'dotenv-rails', '~> 2.2' -gem 'aws-sdk', '~> 2.10', require: false +gem 'aws-sdk-s3', '~> 1.8', require: false gem 'fog-core', '~> 1.45' gem 'fog-local', '~> 0.4', require: false gem 'fog-openstack', '~> 0.1', require: false -gem 'paperclip', '~> 5.1' +gem 'paperclip', '~> 6.0' gem 'paperclip-av-transcoder', '~> 0.6' gem 'streamio-ffmpeg', '~> 3.0' diff --git a/Gemfile.lock b/Gemfile.lock index 0640b140b1..dd17be944d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,13 +57,18 @@ GEM encryptor (~> 3.0.0) av (0.9.0) cocaine (~> 0.5.3) - aws-sdk (2.10.100) - aws-sdk-resources (= 2.10.100) - aws-sdk-core (2.10.100) + aws-partitions (1.70.0) + aws-sdk-core (3.17.0) + aws-partitions (~> 1.0) aws-sigv4 (~> 1.0) jmespath (~> 1.0) - aws-sdk-resources (2.10.100) - aws-sdk-core (= 2.10.100) + aws-sdk-kms (1.5.0) + aws-sdk-core (~> 3) + aws-sigv4 (~> 1.0) + aws-sdk-s3 (1.8.2) + aws-sdk-core (~> 3) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.0) aws-sigv4 (1.0.2) bcrypt (3.1.11) better_errors (2.4.0) @@ -236,7 +241,7 @@ GEM httplog (0.99.7) colorize rack - i18n (0.9.3) + i18n (0.9.5) concurrent-ruby (~> 1.0) i18n-tasks (0.9.19) activesupport (>= 4.0.2) @@ -342,12 +347,12 @@ GEM http (~> 3.0) nokogiri (~> 1.8) ox (2.8.2) - paperclip (5.2.1) + paperclip (6.0.0) activemodel (>= 4.2.0) activesupport (>= 4.2.0) - cocaine (~> 0.5.5) mime-types mimemagic (~> 0.3.0) + terrapin (~> 0.6.0) paperclip-av-transcoder (0.6.4) av (~> 0.9.0) paperclip (>= 2.5.2) @@ -552,6 +557,8 @@ GEM temple (0.8.0) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) + terrapin (0.6.0) + climate_control (>= 0.0.3, < 1.0) thor (0.20.0) thread (0.2.2) thread_safe (0.3.6) @@ -575,7 +582,7 @@ GEM tty-screen (0.6.4) twitter-text (1.14.7) unf (~> 0.1.0) - tzinfo (1.2.4) + tzinfo (1.2.5) thread_safe (~> 0.1) tzinfo-data (1.2017.3) tzinfo (>= 1.0.0) @@ -612,7 +619,7 @@ DEPENDENCIES active_record_query_trace (~> 1.5) addressable (~> 2.5) annotate (~> 2.7) - aws-sdk (~> 2.10) + aws-sdk-s3 (~> 1.8) better_errors (~> 2.4) binding_of_caller (~> 0.7) bootsnap @@ -671,7 +678,7 @@ DEPENDENCIES omniauth-saml (~> 1.10) ostatus2 (~> 2.0) ox (~> 2.8) - paperclip (~> 5.1) + paperclip (~> 6.0) paperclip-av-transcoder (~> 0.6) parallel_tests (~> 2.17) pg (~> 0.20) diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index 8aa1d1b6ed..17a520aa20 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -14,8 +14,7 @@ Paperclip::Attachment.default_options.merge!( ) if ENV['S3_ENABLED'] == 'true' - require 'aws-sdk' - Aws.eager_autoload!(services: %w(S3)) + require 'aws-sdk-s3' s3_region = ENV.fetch('S3_REGION') { 'us-east-1' } s3_protocol = ENV.fetch('S3_PROTOCOL') { 'https' } From 338bff8b93fa939c2968818e53386fd0c013d9a9 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Sat, 17 Mar 2018 21:27:19 +0900 Subject: [PATCH 05/12] Correct the reference to user's password in mastodon:add_user task (#6800) --- lib/tasks/mastodon.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index 13df76f910..cf32b14954 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -472,7 +472,7 @@ namespace :mastodon do if user.save prompt.ok 'User created and confirmation mail sent to the user\'s email address.' - prompt.ok "Here is the random password generated for the user: #{password}" + prompt.ok "Here is the random password generated for the user: #{user.password}" else prompt.warn 'User was not created because of the following errors:' From 4a0a19fe54f1d2d433ad3d72c35f2bbb915279f6 Mon Sep 17 00:00:00 2001 From: Daniel Hunsaker Date: Sat, 17 Mar 2018 06:27:50 -0600 Subject: [PATCH 06/12] Handle Mastodon::HostValidationError when pulling remoteable assets (#6782) This will prevent, for example, `rake mastodon:redownload_avatars` from crashing when an instance is no longer responding to connection attempts, instead silently continuing as expected. --- app/models/concerns/remotable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/concerns/remotable.rb b/app/models/concerns/remotable.rb index 020303a2f9..69685ec83a 100644 --- a/app/models/concerns/remotable.rb +++ b/app/models/concerns/remotable.rb @@ -38,7 +38,7 @@ module Remotable send("#{attachment_name}_file_name=", basename + extname) self[attribute_name] = url if has_attribute?(attribute_name) - rescue HTTP::TimeoutError, HTTP::ConnectionError, OpenSSL::SSL::SSLError, Paperclip::Errors::NotIdentifiedByImageMagickError, Addressable::URI::InvalidURIError => e + rescue HTTP::TimeoutError, HTTP::ConnectionError, OpenSSL::SSL::SSLError, Paperclip::Errors::NotIdentifiedByImageMagickError, Addressable::URI::InvalidURIError, Mastodon::HostValidationError => e Rails.logger.debug "Error fetching remote #{attachment_name}: #{e}" nil end From 0074cad44ffcbbdbc798f57a21829359741e60d9 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 17 Mar 2018 14:06:25 +0100 Subject: [PATCH 07/12] Downgrade Dockerfile to Ruby 2.4.3 on Alpine 3.6 (#6806) Fix 6734 --- Dockerfile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9eb5e609df..a5d1d9caac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.5.0-alpine3.7 +FROM ruby:2.4.3-alpine3.6 LABEL maintainer="https://github.com/tootsuite/mastodon" \ description="Your self-hosted, globally interconnected microblogging community" @@ -9,6 +9,8 @@ ARG GID=991 ENV RAILS_SERVE_STATIC_FILES=true \ RAILS_ENV=production NODE_ENV=production +ARG YARN_VERSION=1.3.2 +ARG YARN_DOWNLOAD_SHA256=6cfe82e530ef0837212f13e45c1565ba53f5199eec2527b85ecbcd88bf26821d ARG LIBICONV_VERSION=1.15 ARG LIBICONV_DOWNLOAD_SHA256=ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178 @@ -38,9 +40,14 @@ RUN apk -U upgrade \ protobuf \ tini \ tzdata \ - yarn \ && update-ca-certificates \ - && mkdir -p /tmp/src \ + && mkdir -p /tmp/src /opt \ + && wget -O yarn.tar.gz "https://github.com/yarnpkg/yarn/releases/download/v$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \ + && echo "$YARN_DOWNLOAD_SHA256 *yarn.tar.gz" | sha256sum -c - \ + && tar -xzf yarn.tar.gz -C /tmp/src \ + && rm yarn.tar.gz \ + && mv /tmp/src/yarn-v$YARN_VERSION /opt/yarn \ + && ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \ && wget -O libiconv.tar.gz "https://ftp.gnu.org/pub/gnu/libiconv/libiconv-$LIBICONV_VERSION.tar.gz" \ && echo "$LIBICONV_DOWNLOAD_SHA256 *libiconv.tar.gz" | sha256sum -c - \ && tar -xzf libiconv.tar.gz -C /tmp/src \ From cdf8b92fea269209cedf38c50bca276cdf47b1fe Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 17 Mar 2018 14:07:00 +0100 Subject: [PATCH 08/12] Bump version to 2.3.2rc1 --- lib/mastodon/version.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 05b13c8024..4f524e9cf7 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -13,7 +13,7 @@ module Mastodon end def patch - 1 + 2 end def pre @@ -21,7 +21,7 @@ module Mastodon end def flags - '' + 'rc1' end def to_a From 40871caa4b06c7ee1c3b07f439ed984ead295ced Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 17 Mar 2018 14:20:35 +0100 Subject: [PATCH 09/12] Revert "Upgrade Paperclip to version 6.0.0" (#6807) * Revert "Bump version to 2.3.2rc1" This reverts commit cdf8b92fea269209cedf38c50bca276cdf47b1fe. * Revert "Downgrade Dockerfile to Ruby 2.4.3 on Alpine 3.6 (#6806)" This reverts commit 0074cad44ffcbbdbc798f57a21829359741e60d9. * Revert "Handle Mastodon::HostValidationError when pulling remoteable assets (#6782)" This reverts commit 4a0a19fe54f1d2d433ad3d72c35f2bbb915279f6. * Revert "Correct the reference to user's password in mastodon:add_user task (#6800)" This reverts commit 338bff8b93fa939c2968818e53386fd0c013d9a9. * Revert "Upgrade Paperclip to version 6.0.0 (#6754)" This reverts commit b88fcd53f711673b21e5ff4a547dbf929866a2ee. --- Gemfile | 4 ++-- Gemfile.lock | 29 +++++++++++------------------ config/initializers/paperclip.rb | 3 ++- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/Gemfile b/Gemfile index 54fcabb05a..3fce2ddc75 100644 --- a/Gemfile +++ b/Gemfile @@ -13,11 +13,11 @@ gem 'pg', '~> 0.20' gem 'pghero', '~> 1.7' gem 'dotenv-rails', '~> 2.2' -gem 'aws-sdk-s3', '~> 1.8', require: false +gem 'aws-sdk', '~> 2.10', require: false gem 'fog-core', '~> 1.45' gem 'fog-local', '~> 0.4', require: false gem 'fog-openstack', '~> 0.1', require: false -gem 'paperclip', '~> 6.0' +gem 'paperclip', '~> 5.1' gem 'paperclip-av-transcoder', '~> 0.6' gem 'streamio-ffmpeg', '~> 3.0' diff --git a/Gemfile.lock b/Gemfile.lock index dd17be944d..0640b140b1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,18 +57,13 @@ GEM encryptor (~> 3.0.0) av (0.9.0) cocaine (~> 0.5.3) - aws-partitions (1.70.0) - aws-sdk-core (3.17.0) - aws-partitions (~> 1.0) + aws-sdk (2.10.100) + aws-sdk-resources (= 2.10.100) + aws-sdk-core (2.10.100) aws-sigv4 (~> 1.0) jmespath (~> 1.0) - aws-sdk-kms (1.5.0) - aws-sdk-core (~> 3) - aws-sigv4 (~> 1.0) - aws-sdk-s3 (1.8.2) - aws-sdk-core (~> 3) - aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.0) + aws-sdk-resources (2.10.100) + aws-sdk-core (= 2.10.100) aws-sigv4 (1.0.2) bcrypt (3.1.11) better_errors (2.4.0) @@ -241,7 +236,7 @@ GEM httplog (0.99.7) colorize rack - i18n (0.9.5) + i18n (0.9.3) concurrent-ruby (~> 1.0) i18n-tasks (0.9.19) activesupport (>= 4.0.2) @@ -347,12 +342,12 @@ GEM http (~> 3.0) nokogiri (~> 1.8) ox (2.8.2) - paperclip (6.0.0) + paperclip (5.2.1) activemodel (>= 4.2.0) activesupport (>= 4.2.0) + cocaine (~> 0.5.5) mime-types mimemagic (~> 0.3.0) - terrapin (~> 0.6.0) paperclip-av-transcoder (0.6.4) av (~> 0.9.0) paperclip (>= 2.5.2) @@ -557,8 +552,6 @@ GEM temple (0.8.0) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) - terrapin (0.6.0) - climate_control (>= 0.0.3, < 1.0) thor (0.20.0) thread (0.2.2) thread_safe (0.3.6) @@ -582,7 +575,7 @@ GEM tty-screen (0.6.4) twitter-text (1.14.7) unf (~> 0.1.0) - tzinfo (1.2.5) + tzinfo (1.2.4) thread_safe (~> 0.1) tzinfo-data (1.2017.3) tzinfo (>= 1.0.0) @@ -619,7 +612,7 @@ DEPENDENCIES active_record_query_trace (~> 1.5) addressable (~> 2.5) annotate (~> 2.7) - aws-sdk-s3 (~> 1.8) + aws-sdk (~> 2.10) better_errors (~> 2.4) binding_of_caller (~> 0.7) bootsnap @@ -678,7 +671,7 @@ DEPENDENCIES omniauth-saml (~> 1.10) ostatus2 (~> 2.0) ox (~> 2.8) - paperclip (~> 6.0) + paperclip (~> 5.1) paperclip-av-transcoder (~> 0.6) parallel_tests (~> 2.17) pg (~> 0.20) diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index 17a520aa20..8aa1d1b6ed 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -14,7 +14,8 @@ Paperclip::Attachment.default_options.merge!( ) if ENV['S3_ENABLED'] == 'true' - require 'aws-sdk-s3' + require 'aws-sdk' + Aws.eager_autoload!(services: %w(S3)) s3_region = ENV.fetch('S3_REGION') { 'us-east-1' } s3_protocol = ENV.fetch('S3_PROTOCOL') { 'https' } From 844616e9505953c9c2735c83b32784588a20c505 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 17 Mar 2018 15:28:09 +0100 Subject: [PATCH 10/12] Re-add git and nodejs-npm to Dockerfile (#6810) Fix #6809 I don't know why, either --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index a5d1d9caac..0801f5747f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,11 +32,13 @@ RUN apk -U upgrade \ ca-certificates \ ffmpeg \ file \ + git \ icu-libs \ imagemagick \ libidn \ libpq \ nodejs \ + nodejs-npm \ protobuf \ tini \ tzdata \ From 092f1df9d0a730df8ae6624feed3b11c321f604a Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 17 Mar 2018 15:28:52 +0100 Subject: [PATCH 11/12] Bump version to 2.3.2rc2 --- lib/mastodon/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 4f524e9cf7..fefe63276e 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -21,7 +21,7 @@ module Mastodon end def flags - 'rc1' + 'rc2' end def to_a From 566ace2d6479c05e51dd8ce24283b8606be631de Mon Sep 17 00:00:00 2001 From: nightpool Date: Sat, 17 Mar 2018 12:39:28 -0400 Subject: [PATCH 12/12] 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