From 09c02b1f4983c71c003afcb6b21f286392c281f7 Mon Sep 17 00:00:00 2001 From: Holger Date: Thu, 31 Mar 2022 17:20:26 +0800 Subject: [PATCH 1/6] fix: PWA web manifest not changed to new routes (#17921) --- app/serializers/manifest_serializer.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/serializers/manifest_serializer.rb b/app/serializers/manifest_serializer.rb index 4786aa760a..ad05fdf6b4 100644 --- a/app/serializers/manifest_serializer.rb +++ b/app/serializers/manifest_serializer.rb @@ -44,7 +44,7 @@ class ManifestSerializer < ActiveModel::Serializer end def start_url - '/web/timelines/home' + '/web/home' end def scope @@ -69,7 +69,7 @@ class ManifestSerializer < ActiveModel::Serializer [ { name: 'New toot', - url: '/web/statuses/new', + url: '/web/publish', icons: [ { src: '/shortcuts/new-status.png', @@ -91,7 +91,7 @@ class ManifestSerializer < ActiveModel::Serializer }, { name: 'Direct messages', - url: '/web/timelines/direct', + url: '/web/conversations', icons: [ { src: '/shortcuts/direct.png', From 042fbadf92e77ee3e8f37e3e7635b0fc2a2b8b45 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 31 Mar 2022 19:10:40 +0900 Subject: [PATCH 2/6] Bump puma from 5.6.2 to 5.6.4 (#17914) Bumps [puma](https://github.com/puma/puma) from 5.6.2 to 5.6.4. - [Release notes](https://github.com/puma/puma/releases) - [Changelog](https://github.com/puma/puma/blob/master/History.md) - [Commits](https://github.com/puma/puma/compare/v5.6.2...v5.6.4) --- updated-dependencies: - dependency-name: puma dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index d8b684ce85..16492c41e0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -459,7 +459,7 @@ GEM pry-rails (0.3.9) pry (>= 0.10.4) public_suffix (4.0.6) - puma (5.6.2) + puma (5.6.4) nio4r (~> 2.0) pundit (2.2.0) activesupport (>= 3.0.0) From b1e4e460dba710d34b67394ba16d2b06bee89e29 Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 1 Apr 2022 23:55:32 +0200 Subject: [PATCH 3/6] Fix assets failing to build with OpenSSL 3 because of deprecated hash algorithm (#17930) Fixes #17924 --- config/webpack/shared.js | 1 + 1 file changed, 1 insertion(+) diff --git a/config/webpack/shared.js b/config/webpack/shared.js index 05828aebe0..3447e711c1 100644 --- a/config/webpack/shared.js +++ b/config/webpack/shared.js @@ -37,6 +37,7 @@ module.exports = { filename: 'js/[name]-[chunkhash].js', chunkFilename: 'js/[name]-[chunkhash].chunk.js', hotUpdateChunkFilename: 'js/[id]-[hash].hot-update.js', + hashFunction: 'sha256', path: output.path, publicPath: output.publicPath, }, From fb3fc6cab4969fba0eaa48ca4f81c0698b76f32a Mon Sep 17 00:00:00 2001 From: Holger Date: Sat, 2 Apr 2022 05:56:23 +0800 Subject: [PATCH 4/6] fix: `s3_force_single_request` not parsed (#17922) --- config/application.rb | 1 - config/initializers/paperclip.rb | 20 ++++++++++++++++++++ lib/paperclip/storage_extensions.rb | 21 --------------------- 3 files changed, 20 insertions(+), 22 deletions(-) delete mode 100644 lib/paperclip/storage_extensions.rb diff --git a/config/application.rb b/config/application.rb index eb5af9cc00..bed935ce39 100644 --- a/config/application.rb +++ b/config/application.rb @@ -27,7 +27,6 @@ require_relative '../lib/sanitize_ext/sanitize_config' require_relative '../lib/redis/namespace_extensions' require_relative '../lib/paperclip/url_generator_extensions' require_relative '../lib/paperclip/attachment_extensions' -require_relative '../lib/paperclip/storage_extensions' require_relative '../lib/paperclip/lazy_thumbnail' require_relative '../lib/paperclip/gif_transcoder' require_relative '../lib/paperclip/transcoder' diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index e2a0456475..26b0a2f7cd 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -83,6 +83,26 @@ if ENV['S3_ENABLED'] == 'true' s3_host_alias: ENV['S3_ALIAS_HOST'] || ENV['S3_CLOUDFRONT_HOST'] ) end + + # Some S3-compatible providers might not actually be compatible with some APIs + # used by kt-paperclip, see https://github.com/mastodon/mastodon/issues/16822 + if ENV['S3_FORCE_SINGLE_REQUEST'] == 'true' + module Paperclip + module Storage + module S3Extensions + def copy_to_local_file(style, local_dest_path) + log("copying #{path(style)} to local file #{local_dest_path}") + s3_object(style).download_file(local_dest_path, { mode: 'single_request' }) + rescue Aws::Errors::ServiceError => e + warn("#{e} - cannot copy #{path(style)} to local file #{local_dest_path}") + false + end + end + end + end + + Paperclip::Storage::S3.prepend(Paperclip::Storage::S3Extensions) + end elsif ENV['SWIFT_ENABLED'] == 'true' require 'fog/openstack' diff --git a/lib/paperclip/storage_extensions.rb b/lib/paperclip/storage_extensions.rb deleted file mode 100644 index 95c35641ed..0000000000 --- a/lib/paperclip/storage_extensions.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Some S3-compatible providers might not actually be compatible with some APIs -# used by kt-paperclip, see https://github.com/mastodon/mastodon/issues/16822 -if ENV['S3_ENABLED'] == 'true' && ENV['S3_FORCE_SINGLE_REQUEST'] == 'true' - module Paperclip - module Storage - module S3Extensions - def copy_to_local_file(style, local_dest_path) - log("copying #{path(style)} to local file #{local_dest_path}") - s3_object(style).download_file(local_dest_path, { mode: 'single_request' }) - rescue Aws::Errors::ServiceError => e - warn("#{e} - cannot copy #{path(style)} to local file #{local_dest_path}") - false - end - end - end - end - - Paperclip::Storage::S3.prepend(Paperclip::Storage::S3Extensions) -end From 4001f3810c2bde29594a957396b43bea49f89d1e Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 1 Apr 2022 23:59:13 +0200 Subject: [PATCH 5/6] Fix unusual number formatting in some locales (#17929) * Fix unusual number formatting in some locales Fixes #17904 * Fix typo --- app/helpers/application_helper.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 651a98a854..9984820da7 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -19,8 +19,11 @@ module ApplicationHelper # is looked up from the locales definition, and rails-i18n comes with # values that don't seem to make much sense for many languages, so # override these values with a default of 3 digits of precision. - options[:precision] = 3 - options[:strip_insignificant_zeros] = true + options = options.merge( + precision: 3, + strip_insignificant_zeros: true, + significant: true + ) number_to_human(number, **options) end From c3eacaecfe7974814c1b169a8c57991a26c8a3ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Pokorn=C3=BD?= Date: Sun, 3 Apr 2022 14:02:29 +0200 Subject: [PATCH 6/6] Update en.yml (#17942) typo --- config/locales/en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 829cd61d0c..4a16098a81 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -598,7 +598,7 @@ en: action_taken_by: Action taken by actions: delete_description_html: The reported posts will be deleted and a strike will be recorded to help you escalate on future infractions by the same account. - mark_as_sensitive_description_html: The media in the reported posts will be marked as sensitive and a strike will be recorded to help you escalate on future refractions by the same account. + mark_as_sensitive_description_html: The media in the reported posts will be marked as sensitive and a strike will be recorded to help you escalate on future infractions by the same account. other_description_html: See more options for controlling the account's behaviour and customize communication to the reported account. resolve_description_html: No action will be taken against the reported account, no strike recorded, and the report will be closed. silence_description_html: The profile will be visible only to those who already follow it or manually look it up, severely limiting its reach. Can always be reverted.