From 7bed25f3eabecc84268a4b6c254cc3e0738926b6 Mon Sep 17 00:00:00 2001 From: ThibG Date: Tue, 12 Jan 2021 09:25:01 +0100 Subject: [PATCH 01/39] Fix processing of incoming Block activities (#15546) Unlike locally-issued blocks, they weren't clearing follow relationships in both directions, follow requests or notifications. Co-authored-by: Claire --- app/lib/activitypub/activity/block.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/lib/activitypub/activity/block.rb b/app/lib/activitypub/activity/block.rb index 90477bf336..92a0f813fb 100644 --- a/app/lib/activitypub/activity/block.rb +++ b/app/lib/activitypub/activity/block.rb @@ -11,8 +11,13 @@ class ActivityPub::Activity::Block < ActivityPub::Activity return end + UnfollowService.new.call(@account, target_account) if @account.following?(target_account) UnfollowService.new.call(target_account, @account) if target_account.following?(@account) + RejectFollowService.new.call(target_account, @account) if target_account.requested?(@account) - @account.block!(target_account, uri: @json['id']) unless delete_arrived_first?(@json['id']) + unless delete_arrived_first?(@json['id']) + BlockWorker.perform_async(@account.id, target_account.id) + @account.block!(target_account, uri: @json['id']) + end end end From 54d4e5252be8cd9fa780df46e06541da8263d368 Mon Sep 17 00:00:00 2001 From: ThibG Date: Tue, 12 Jan 2021 09:27:38 +0100 Subject: [PATCH 02/39] Use Rails' index_by where it makes sense (#15542) * Use Rails' index_by where it makes sense * Fix tests Co-authored-by: Claire --- app/controllers/api/v1/markers_controller.rb | 2 +- app/controllers/concerns/cache_concern.rb | 2 +- app/lib/entity_cache.rb | 2 +- app/lib/settings/scoped_settings.rb | 2 +- app/lib/webfinger.rb | 2 +- app/models/account.rb | 2 +- app/models/notification.rb | 2 +- app/models/setting.rb | 2 +- app/models/status.rb | 2 +- app/models/trending_tags.rb | 2 +- lib/mastodon/media_cli.rb | 2 +- spec/models/notification_spec.rb | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/controllers/api/v1/markers_controller.rb b/app/controllers/api/v1/markers_controller.rb index 28c2ec7916..867e6facf4 100644 --- a/app/controllers/api/v1/markers_controller.rb +++ b/app/controllers/api/v1/markers_controller.rb @@ -7,7 +7,7 @@ class Api::V1::MarkersController < Api::BaseController before_action :require_user! def index - @markers = current_user.markers.where(timeline: Array(params[:timeline])).each_with_object({}) { |marker, h| h[marker.timeline] = marker } + @markers = current_user.markers.where(timeline: Array(params[:timeline])).index_by(&:timeline) render json: serialize_map(@markers) end diff --git a/app/controllers/concerns/cache_concern.rb b/app/controllers/concerns/cache_concern.rb index 8d82eda5c1..3fb4b962a3 100644 --- a/app/controllers/concerns/cache_concern.rb +++ b/app/controllers/concerns/cache_concern.rb @@ -38,7 +38,7 @@ module CacheConcern klass.reload_stale_associations!(cached_keys_with_value.values) if klass.respond_to?(:reload_stale_associations!) unless uncached_ids.empty? - uncached = klass.where(id: uncached_ids).with_includes.each_with_object({}) { |item, h| h[item.id] = item } + uncached = klass.where(id: uncached_ids).with_includes.index_by(&:id) uncached.each_value do |item| Rails.cache.write(item, item) diff --git a/app/lib/entity_cache.rb b/app/lib/entity_cache.rb index e38a3adcdc..5d51e85852 100644 --- a/app/lib/entity_cache.rb +++ b/app/lib/entity_cache.rb @@ -25,7 +25,7 @@ class EntityCache end unless uncached_ids.empty? - uncached = CustomEmoji.where(shortcode: shortcodes, domain: domain, disabled: false).each_with_object({}) { |item, h| h[item.shortcode] = item } + uncached = CustomEmoji.where(shortcode: shortcodes, domain: domain, disabled: false).index_by(&:shortcode) uncached.each_value { |item| Rails.cache.write(to_key(:emoji, item.shortcode, domain), item, expires_in: MAX_EXPIRATION) } end diff --git a/app/lib/settings/scoped_settings.rb b/app/lib/settings/scoped_settings.rb index ef694205c4..acabf0c8e0 100644 --- a/app/lib/settings/scoped_settings.rb +++ b/app/lib/settings/scoped_settings.rb @@ -30,7 +30,7 @@ module Settings def all_as_records vars = thing_scoped - records = vars.each_with_object({}) { |r, h| h[r.var] = r } + records = vars.index_by(&:var) Setting.default_settings.each do |key, default_value| next if records.key?(key) || default_value.is_a?(Hash) diff --git a/app/lib/webfinger.rb b/app/lib/webfinger.rb index c7aa43bb33..7023659395 100644 --- a/app/lib/webfinger.rb +++ b/app/lib/webfinger.rb @@ -21,7 +21,7 @@ class Webfinger private def links - @links ||= @json['links'].map { |link| [link['rel'], link] }.to_h + @links ||= @json['links'].index_by { |link| link['rel'] } end end diff --git a/app/models/account.rb b/app/models/account.rb index 75ebfb2f33..6f5bc6295c 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -273,7 +273,7 @@ class Account < ApplicationRecord end def tags_as_strings=(tag_names) - hashtags_map = Tag.find_or_create_by_names(tag_names).each_with_object({}) { |tag, h| h[tag.name] = tag } + hashtags_map = Tag.find_or_create_by_names(tag_names).index_by(&:name) # Remove hashtags that are to be deleted tags.each do |tag| diff --git a/app/models/notification.rb b/app/models/notification.rb index b6db37d6dc..5e9ea62a0d 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -96,7 +96,7 @@ class Notification < ApplicationRecord return if account_ids.empty? - accounts = Account.where(id: account_ids).includes(:account_stat).each_with_object({}) { |a, h| h[a.id] = a } + accounts = Account.where(id: account_ids).includes(:account_stat).index_by(&:id) cached_items.each do |item| item.from_account = accounts[item.from_account_id] diff --git a/app/models/setting.rb b/app/models/setting.rb index a5878e96a2..4bcaa060ff 100644 --- a/app/models/setting.rb +++ b/app/models/setting.rb @@ -40,7 +40,7 @@ class Setting < RailsSettings::Base def all_as_records vars = thing_scoped - records = vars.each_with_object({}) { |r, h| h[r.var] = r } + records = vars.index_by(&:var) default_settings.each do |key, default_value| next if records.key?(key) || default_value.is_a?(Hash) diff --git a/app/models/status.rb b/app/models/status.rb index 558a37f99a..fcc7a026d5 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -301,7 +301,7 @@ class Status < ApplicationRecord return if account_ids.empty? - accounts = Account.where(id: account_ids).includes(:account_stat).each_with_object({}) { |a, h| h[a.id] = a } + accounts = Account.where(id: account_ids).includes(:account_stat).index_by(&:id) cached_items.each do |item| item.account = accounts[item.account_id] diff --git a/app/models/trending_tags.rb b/app/models/trending_tags.rb index c69f6d3c33..9c2aa0ee8b 100644 --- a/app/models/trending_tags.rb +++ b/app/models/trending_tags.rb @@ -91,7 +91,7 @@ class TrendingTags tags = Tag.where(id: tag_ids) tags = tags.trendable if filtered - tags = tags.each_with_object({}) { |tag, h| h[tag.id] = tag } + tags = tags.index_by(&:id) tag_ids.map { |tag_id| tags[tag_id] }.compact.take(limit) end diff --git a/lib/mastodon/media_cli.rb b/lib/mastodon/media_cli.rb index 5f4a414b1a..59c118500a 100644 --- a/lib/mastodon/media_cli.rb +++ b/lib/mastodon/media_cli.rb @@ -326,7 +326,7 @@ module Mastodon end preload_map.each_with_object({}) do |(model_name, record_ids), model_map| - model_map[model_name] = model_name.constantize.where(id: record_ids).each_with_object({}) { |record, record_map| record_map[record.id] = record } + model_map[model_name] = model_name.constantize.where(id: record_ids).index_by(&:id) end end end diff --git a/spec/models/notification_spec.rb b/spec/models/notification_spec.rb index d2e676ec26..0a045904bb 100644 --- a/spec/models/notification_spec.rb +++ b/spec/models/notification_spec.rb @@ -71,7 +71,7 @@ RSpec.describe Notification, type: :model do before do allow(accounts_with_ids).to receive(:[]).with(stale_account1.id).and_return(account1) allow(accounts_with_ids).to receive(:[]).with(stale_account2.id).and_return(account2) - allow(Account).to receive_message_chain(:where, :includes, :each_with_object).and_return(accounts_with_ids) + allow(Account).to receive_message_chain(:where, :includes, :index_by).and_return(accounts_with_ids) end let(:cached_items) do From fe6ee39168049ed21f9a5955e1b1736a382c7085 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Jan 2021 00:59:43 +0900 Subject: [PATCH 03/39] Bump nokogiri from 1.11.0 to 1.11.1 (#15539) Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.0 to 1.11.1. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.0...v1.11.1) 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 24954ebe97..5e9808c0bd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -359,7 +359,7 @@ GEM net-ssh (>= 2.6.5, < 7.0.0) net-ssh (6.1.0) nio4r (2.5.4) - nokogiri (1.11.0) + nokogiri (1.11.1) mini_portile2 (~> 2.5.0) racc (~> 1.4) nokogumbo (2.0.2) From 4812c16cb520f638bc46fbea107e651a1d9ce8f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Jan 2021 01:02:51 +0900 Subject: [PATCH 04/39] Bump sanitize from 5.2.1 to 5.2.2 (#15538) Bumps [sanitize](https://github.com/rgrove/sanitize) from 5.2.1 to 5.2.2. - [Release notes](https://github.com/rgrove/sanitize/releases) - [Changelog](https://github.com/rgrove/sanitize/blob/master/HISTORY.md) - [Commits](https://github.com/rgrove/sanitize/compare/v5.2.1...v5.2.2) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5e9808c0bd..5bf10e076c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -362,7 +362,7 @@ GEM nokogiri (1.11.1) mini_portile2 (~> 2.5.0) racc (~> 1.4) - nokogumbo (2.0.2) + nokogumbo (2.0.4) nokogiri (~> 1.8, >= 1.8.4) nsa (0.2.7) activesupport (>= 4.2, < 6) @@ -560,7 +560,7 @@ GEM fugit (~> 1.1, >= 1.1.6) safety_net_attestation (0.4.0) jwt (~> 2.0) - sanitize (5.2.1) + sanitize (5.2.2) crass (~> 1.0.2) nokogiri (>= 1.8.0) nokogumbo (~> 2.0) From 1118194f29c5b6f2e9215118dc857b4818ddc4de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Jan 2021 01:06:28 +0900 Subject: [PATCH 05/39] Bump simplecov from 0.21.0 to 0.21.2 (#15536) Bumps [simplecov](https://github.com/simplecov-ruby/simplecov) from 0.21.0 to 0.21.2. - [Release notes](https://github.com/simplecov-ruby/simplecov/releases) - [Changelog](https://github.com/simplecov-ruby/simplecov/blob/main/CHANGELOG.md) - [Commits](https://github.com/simplecov-ruby/simplecov/compare/v0.21.0...v0.21.2) 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 5bf10e076c..85767aa149 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -591,7 +591,7 @@ GEM simple_form (5.0.3) actionpack (>= 5.0) activemodel (>= 5.0) - simplecov (0.21.0) + simplecov (0.21.2) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) From 2d4a550d105e73767138f8cf27f851599ee5b4d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Jan 2021 01:08:19 +0900 Subject: [PATCH 06/39] Bump sass from 1.32.0 to 1.32.2 (#15534) Bumps [sass](https://github.com/sass/dart-sass) from 1.32.0 to 1.32.2. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/master/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.32.0...1.32.2) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 24cc953e23..d90b338599 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,7 @@ "requestidlecallback": "^0.3.0", "reselect": "^4.0.0", "rimraf": "^3.0.2", - "sass": "^1.32.0", + "sass": "^1.32.2", "sass-loader": "^10.1.0", "stacktrace-js": "^2.0.2", "stringz": "^2.1.0", diff --git a/yarn.lock b/yarn.lock index 59199e93db..a8978db5fa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9518,10 +9518,10 @@ sass-loader@^10.1.0: schema-utils "^3.0.0" semver "^7.3.2" -sass@^1.32.0: - version "1.32.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.32.0.tgz#10101a026c13080b14e2b374d4e15ee24400a4d3" - integrity sha512-fhyqEbMIycQA4blrz/C0pYhv2o4x2y6FYYAH0CshBw3DXh5D5wyERgxw0ptdau1orc/GhNrhF7DFN2etyOCEng== +sass@^1.32.2: + version "1.32.2" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.32.2.tgz#66dc0250bc86c15d19ddee7135e93d0cf3d3257b" + integrity sha512-u1pUuzqwz3SAgvHSWp1k0mRhX82b2DdlVnP6UIetQPZtYbuJUDaPQhZE12jyjB7vYeOScfz9WPsZJB6Rpk7heA== dependencies: chokidar ">=2.0.0 <4.0.0" From 03c8590b2821e4cf2ae1c10444d25c161627e070 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Jan 2021 01:08:45 +0900 Subject: [PATCH 07/39] Bump @testing-library/react from 11.2.2 to 11.2.3 (#15533) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.2.2 to 11.2.3. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/master/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v11.2.2...v11.2.3) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d90b338599..61c07fee35 100644 --- a/package.json +++ b/package.json @@ -172,7 +172,7 @@ }, "devDependencies": { "@testing-library/jest-dom": "^5.11.8", - "@testing-library/react": "^11.2.2", + "@testing-library/react": "^11.2.3", "babel-eslint": "^10.1.0", "babel-jest": "^26.6.3", "eslint": "^7.17.0", diff --git a/yarn.lock b/yarn.lock index a8978db5fa..13f83c4194 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1399,10 +1399,10 @@ lodash "^4.17.15" redent "^3.0.0" -"@testing-library/react@^11.2.2": - version "11.2.2" - resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-11.2.2.tgz#099c6c195140ff069211143cb31c0f8337bdb7b7" - integrity sha512-jaxm0hwUjv+hzC+UFEywic7buDC9JQ1q3cDsrWVSDAPmLotfA6E6kUHlYm/zOeGCac6g48DR36tFHxl7Zb+N5A== +"@testing-library/react@^11.2.3": + version "11.2.3" + resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-11.2.3.tgz#9971ede1c8465a231d7982eeca3c39fc362d5443" + integrity sha512-BirBUGPkTW28ULuCwIbYo0y2+0aavHczBT6N9r3LrsswEW3pg25l1wgoE7I8QBIy1upXWkwKpYdWY7NYYP0Bxw== dependencies: "@babel/runtime" "^7.12.5" "@testing-library/dom" "^7.28.1" From 086d1e675a9591de22374039bd4f4dbebd899d7e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Jan 2021 01:09:26 +0900 Subject: [PATCH 08/39] Bump @rails/ujs from 6.1.0 to 6.1.1 (#15531) Bumps [@rails/ujs](https://github.com/rails/rails) from 6.1.0 to 6.1.1. - [Release notes](https://github.com/rails/rails/releases) - [Commits](https://github.com/rails/rails/compare/v6.1.0...v6.1.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 61c07fee35..31ef5f85ff 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "@clusterws/cws": "^3.0.0", "@gamestdio/websocket": "^0.3.2", "@github/webauthn-json": "^0.5.7", - "@rails/ujs": "^6.1.0", + "@rails/ujs": "^6.1.1", "array-includes": "^3.1.2", "arrow-key-navigation": "^1.2.0", "autoprefixer": "^9.8.6", diff --git a/yarn.lock b/yarn.lock index 13f83c4194..9b84001788 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1352,10 +1352,10 @@ resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.11.tgz#aeb16f50649a91af79dbe36574b66d0f9e4d9f71" integrity sha512-3NsZsJIA/22P3QUyrEDNA2D133H4j224twJrdipXN38dpnIOzAbUDtOwkcJ5pXmn75w7LSQDjA4tO9dm1XlqlA== -"@rails/ujs@^6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-6.1.0.tgz#9a48df6511cb2b472c9f596c1f37dc0af022e751" - integrity sha512-kQNKyM4ePAc4u9eR1c4OqrbAHH+3SJXt++8izIjeaZeg+P7yBtgoF/dogMD/JPPowNC74ACFpM/4op0Ggp/fPw== +"@rails/ujs@^6.1.1": + version "6.1.1" + resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-6.1.1.tgz#25c4e60018274b37e5ba0850134f6445429de2f5" + integrity sha512-uF6zEbXpGkNa7Vvxrd9Yqas8xsbc3lsC733V6I7fXgPuj8xXiuZakdE4uIyQSFRVmZKe12qmC6CNJNtIEvt4bA== "@sinonjs/commons@^1.7.0": version "1.8.1" From 096347be10e2cce37ab58ad920586adfb27273bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Jan 2021 01:12:22 +0900 Subject: [PATCH 09/39] Bump webpack from 4.44.2 to 4.45.0 (#15535) Bumps [webpack](https://github.com/webpack/webpack) from 4.44.2 to 4.45.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v4.44.2...v4.45.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 31ef5f85ff..001c38c9df 100644 --- a/package.json +++ b/package.json @@ -163,7 +163,7 @@ "throng": "^4.0.0", "tiny-queue": "^0.2.1", "uuid": "^8.3.1", - "webpack": "^4.44.2", + "webpack": "^4.45.0", "webpack-assets-manifest": "^4.0.0", "webpack-bundle-analyzer": "^4.3.0", "webpack-cli": "^3.3.12", diff --git a/yarn.lock b/yarn.lock index 9b84001788..6fb91aaa10 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11175,10 +11175,10 @@ webpack-sources@^1.0, webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-so source-list-map "^2.0.0" source-map "~0.6.1" -webpack@^4.44.2: - version "4.44.2" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.44.2.tgz#6bfe2b0af055c8b2d1e90ed2cd9363f841266b72" - integrity sha512-6KJVGlCxYdISyurpQ0IPTklv+DULv05rs2hseIXer6D7KrUicRDLFb4IUM1S6LUAKypPM/nSiVSuv8jHu1m3/Q== +webpack@^4.45.0: + version "4.45.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.45.0.tgz#bcdc1ddb43959adb47f8974e60d944027267c1be" + integrity sha512-JhDaVi4CbRcwLLAoqC7eugMSMJnZbIfE2AyjaZ19pnOIh/R2O/lXOiXA2tQFN0iXEcxgpPJsPJHW2wOWqiTLcw== dependencies: "@webassemblyjs/ast" "1.9.0" "@webassemblyjs/helper-module-context" "1.9.0" From e46b50e805e80d78c0efa39af3bd822912f2cdb9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Jan 2021 11:10:23 +0900 Subject: [PATCH 10/39] Bump capistrano from 3.14.1 to 3.15.0 (#15537) * Bump capistrano from 3.14.1 to 3.15.0 Bumps [capistrano](https://github.com/capistrano/capistrano) from 3.14.1 to 3.15.0. - [Release notes](https://github.com/capistrano/capistrano/releases) - [Commits](https://github.com/capistrano/capistrano/compare/v3.14.1...v3.15.0) Signed-off-by: dependabot[bot] * Fix config/deploy.rb Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yamagishi Kazutoshi --- Gemfile | 2 +- Gemfile.lock | 8 ++++---- config/deploy.rb | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 75ecbda04b..5454140ea6 100644 --- a/Gemfile +++ b/Gemfile @@ -143,7 +143,7 @@ group :development do gem 'brakeman', '~> 4.10', require: false gem 'bundler-audit', '~> 0.7', require: false - gem 'capistrano', '~> 3.14' + gem 'capistrano', '~> 3.15' gem 'capistrano-rails', '~> 1.6' gem 'capistrano-rbenv', '~> 2.2' gem 'capistrano-yarn', '~> 2.0' diff --git a/Gemfile.lock b/Gemfile.lock index 85767aa149..7b677837f7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -116,7 +116,7 @@ GEM bundler (>= 1.2.0, < 3) thor (>= 0.18, < 2) byebug (11.1.3) - capistrano (3.14.1) + capistrano (3.15.0) airbrussh (>= 1.0.0) i18n rake (>= 10.0.0) @@ -272,7 +272,7 @@ GEM httplog (1.4.3) rack (>= 1.0) rainbow (>= 2.0.0) - i18n (1.8.5) + i18n (1.8.7) concurrent-ruby (~> 1.0) i18n-tasks (0.9.33) activesupport (>= 4.0.2) @@ -604,7 +604,7 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sshkit (1.21.0) + sshkit (1.21.1) net-scp (>= 1.1.2) net-ssh (>= 2.8.0) stackprof (0.2.16) @@ -697,7 +697,7 @@ DEPENDENCIES browser bullet (~> 6.1) bundler-audit (~> 0.7) - capistrano (~> 3.14) + capistrano (~> 3.15) capistrano-rails (~> 1.6) capistrano-rbenv (~> 2.2) capistrano-yarn (~> 2.0) diff --git a/config/deploy.rb b/config/deploy.rb index 5d68735886..c0d72f48ff 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -lock '3.14.1' +lock '3.15.0' set :repo_url, ENV.fetch('REPO', 'https://github.com/tootsuite/mastodon.git') set :branch, ENV.fetch('BRANCH', 'master') From 2ff01f78f79d0b075e127a6aee05c4c429daf569 Mon Sep 17 00:00:00 2001 From: ThibG Date: Tue, 19 Jan 2021 06:47:36 +0100 Subject: [PATCH 11/39] Fix /activity endpoint not require signature in authorized fetch mode (#15592) Fixes #15589 Co-authored-by: Claire --- app/controllers/statuses_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb index 17ddd31fbb..87612a2966 100644 --- a/app/controllers/statuses_controller.rb +++ b/app/controllers/statuses_controller.rb @@ -8,7 +8,7 @@ class StatusesController < ApplicationController layout 'public' - before_action :require_signature!, only: :show, if: -> { request.format == :json && authorized_fetch_mode? } + before_action :require_signature!, only: [:show, :activity], if: -> { request.format == :json && authorized_fetch_mode? } before_action :set_status before_action :set_instance_presenter before_action :set_link_headers From b696a902fda70e37be8edb630edf6d2252792743 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Jan 2021 21:05:06 +0900 Subject: [PATCH 12/39] Bump sass-loader from 10.1.0 to 10.1.1 (#15568) Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 10.1.0 to 10.1.1. - [Release notes](https://github.com/webpack-contrib/sass-loader/releases) - [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/sass-loader/compare/v10.1.0...v10.1.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 001c38c9df..9833e0b69e 100644 --- a/package.json +++ b/package.json @@ -154,7 +154,7 @@ "reselect": "^4.0.0", "rimraf": "^3.0.2", "sass": "^1.32.2", - "sass-loader": "^10.1.0", + "sass-loader": "^10.1.1", "stacktrace-js": "^2.0.2", "stringz": "^2.1.0", "substring-trie": "^1.0.2", diff --git a/yarn.lock b/yarn.lock index 6fb91aaa10..636af79a48 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9507,10 +9507,10 @@ sass-lint@^1.13.1: path-is-absolute "^1.0.0" util "^0.10.3" -sass-loader@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-10.1.0.tgz#1727fcc0c32ab3eb197cda61d78adf4e9174a4b3" - integrity sha512-ZCKAlczLBbFd3aGAhowpYEy69Te3Z68cg8bnHHl6WnSCvnKpbM6pQrz957HWMa8LKVuhnD9uMplmMAHwGQtHeg== +sass-loader@^10.1.1: + version "10.1.1" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-10.1.1.tgz#4ddd5a3d7638e7949065dd6e9c7c04037f7e663d" + integrity sha512-W6gVDXAd5hR/WHsPicvZdjAWHBcEJ44UahgxcIE196fW2ong0ZHMPO1kZuI5q0VlvMQZh32gpv69PLWQm70qrw== dependencies: klona "^2.0.4" loader-utils "^2.0.0" From 8c6a3c18ff54c554eb07b96d99bd86a51306f972 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Jan 2021 21:17:59 +0900 Subject: [PATCH 13/39] Bump webmock from 3.11.0 to 3.11.1 (#15570) Bumps [webmock](https://github.com/bblimke/webmock) from 3.11.0 to 3.11.1. - [Release notes](https://github.com/bblimke/webmock/releases) - [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md) - [Commits](https://github.com/bblimke/webmock/compare/v3.11.0...v3.11.1) 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 7b677837f7..16d0e5bb69 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -660,7 +660,7 @@ GEM safety_net_attestation (~> 0.4.0) securecompare (~> 1.0) tpm-key_attestation (~> 0.9.0) - webmock (3.11.0) + webmock (3.11.1) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) From 3126b9e9745eddf21b6dc955864e234b1d488291 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Jan 2021 21:24:38 +0900 Subject: [PATCH 14/39] Bump mini-css-extract-plugin from 1.3.3 to 1.3.4 (#15572) Bumps [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) from 1.3.3 to 1.3.4. - [Release notes](https://github.com/webpack-contrib/mini-css-extract-plugin/releases) - [Changelog](https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.3.3...v1.3.4) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 9833e0b69e..220e521177 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "lodash": "^4.17.19", "mark-loader": "^0.1.6", "marky": "^1.2.1", - "mini-css-extract-plugin": "^1.3.3", + "mini-css-extract-plugin": "^1.3.4", "mkdirp": "^1.0.4", "npmlog": "^4.1.2", "object-assign": "^4.1.1", diff --git a/yarn.lock b/yarn.lock index 636af79a48..848bec647a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7105,10 +7105,10 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -mini-css-extract-plugin@^1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-1.3.3.tgz#7802e62b34199aa7d1a62e654395859a836486a0" - integrity sha512-7lvliDSMiuZc81kI+5/qxvn47SCM7BehXex3f2c6l/pR3Goj58IQxZh9nuPQ3AkGQgoETyXuIqLDaO5Oa0TyBw== +mini-css-extract-plugin@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-1.3.4.tgz#706e69632cdcdb8b15bf8e638442a0dba304a9c8" + integrity sha512-dNjqyeogUd8ucUgw5sxm1ahvSfSUgef7smbmATRSbDm4EmNx5kQA6VdUEhEeCKSjX6CTYjb5vxgMUvRjqP3uHg== dependencies: loader-utils "^2.0.0" schema-utils "^3.0.0" From f7c205d8c1c0cb04d0d983e1160ba5d182a539de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Jan 2021 21:27:49 +0900 Subject: [PATCH 15/39] Bump @testing-library/jest-dom from 5.11.8 to 5.11.9 (#15574) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.11.8 to 5.11.9. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/master/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.11.8...v5.11.9) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 220e521177..261f1c0b5f 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "wicg-inert": "^3.1.0" }, "devDependencies": { - "@testing-library/jest-dom": "^5.11.8", + "@testing-library/jest-dom": "^5.11.9", "@testing-library/react": "^11.2.3", "babel-eslint": "^10.1.0", "babel-jest": "^26.6.3", diff --git a/yarn.lock b/yarn.lock index 848bec647a..1501dec2a0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1385,10 +1385,10 @@ lz-string "^1.4.4" pretty-format "^26.6.2" -"@testing-library/jest-dom@^5.11.8": - version "5.11.8" - resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-5.11.8.tgz#433a84d6f9a089485101b9e112ef03e5c30bcbfc" - integrity sha512-ScyKrWQM5xNcr79PkSewnA79CLaoxVskE+f7knTOhDD9ftZSA1Jw8mj+pneqhEu3x37ncNfW84NUr7lqK+mXjA== +"@testing-library/jest-dom@^5.11.9": + version "5.11.9" + resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-5.11.9.tgz#e6b3cd687021f89f261bd53cbe367041fbd3e975" + integrity sha512-Mn2gnA9d1wStlAIT2NU8J15LNob0YFBVjs2aEQ3j8rsfRQo+lAs7/ui1i2TGaJjapLmuNPLTsrm+nPjmZDwpcQ== dependencies: "@babel/runtime" "^7.9.2" "@types/testing-library__jest-dom" "^5.9.1" From d1d2a4e8692ac846e8aafbefd445d25711340607 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Jan 2021 21:28:45 +0900 Subject: [PATCH 16/39] Bump webpack-dev-server from 3.11.1 to 3.11.2 (#15577) Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 3.11.1 to 3.11.2. - [Release notes](https://github.com/webpack/webpack-dev-server/releases) - [Changelog](https://github.com/webpack/webpack-dev-server/blob/v3.11.2/CHANGELOG.md) - [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.11.1...v3.11.2) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 261f1c0b5f..737d4acde2 100644 --- a/package.json +++ b/package.json @@ -185,7 +185,7 @@ "react-intl-translations-manager": "^5.0.3", "react-test-renderer": "^16.14.0", "sass-lint": "^1.13.1", - "webpack-dev-server": "^3.11.1", + "webpack-dev-server": "^3.11.2", "yargs": "^16.2.0" }, "resolutions": { diff --git a/yarn.lock b/yarn.lock index 1501dec2a0..2e084f748e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11112,10 +11112,10 @@ webpack-dev-middleware@^3.7.2: range-parser "^1.2.1" webpack-log "^2.0.0" -webpack-dev-server@^3.11.1: - version "3.11.1" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.11.1.tgz#c74028bf5ba8885aaf230e48a20e8936ab8511f0" - integrity sha512-u4R3mRzZkbxQVa+MBWi2uVpB5W59H3ekZAJsQlKUTdl7Elcah2EhygTPLmeFXybQkf9i2+L0kn7ik9SnXa6ihQ== +webpack-dev-server@^3.11.2: + version "3.11.2" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.11.2.tgz#695ebced76a4929f0d5de7fd73fafe185fe33708" + integrity sha512-A80BkuHRQfCiNtGBS1EMf2ChTUs0x+B3wGDFmOeT4rmJOHhHTCH2naNxIHhmkr0/UillP4U3yeIyv1pNp+QDLQ== dependencies: ansi-html "0.0.7" bonjour "^3.5.0" From 266a95ee8f0d3a077a17a9d968aede129ad998d1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Jan 2021 21:29:29 +0900 Subject: [PATCH 17/39] Bump ox from 2.14.0 to 2.14.1 (#15576) Bumps [ox](https://github.com/ohler55/ox) from 2.14.0 to 2.14.1. - [Release notes](https://github.com/ohler55/ox/releases) - [Changelog](https://github.com/ohler55/ox/blob/develop/CHANGELOG.md) - [Commits](https://github.com/ohler55/ox/compare/v2.14.0...v2.14.1) 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 16d0e5bb69..dcd64001d0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -386,7 +386,7 @@ GEM openssl (2.2.0) openssl-signature_algorithm (0.4.0) orm_adapter (0.5.0) - ox (2.14.0) + ox (2.14.1) paperclip (6.0.0) activemodel (>= 4.2.0) activesupport (>= 4.2.0) From c0499c1fcb1cdfed9b86bd61166150cef93171f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Jan 2021 21:30:56 +0900 Subject: [PATCH 18/39] Bump oj from 3.10.18 to 3.11.0 (#15583) Bumps [oj](https://github.com/ohler55/oj) from 3.10.18 to 3.11.0. - [Release notes](https://github.com/ohler55/oj/releases) - [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md) - [Commits](https://github.com/ohler55/oj/compare/v3.10.18...v3.11.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 5454140ea6..f32e00ec88 100644 --- a/Gemfile +++ b/Gemfile @@ -66,7 +66,7 @@ gem 'mime-types', '~> 3.3.1', require: 'mime/types/columnar' gem 'nilsimsa', git: 'https://github.com/witgo/nilsimsa', ref: 'fd184883048b922b176939f851338d0a4971a532' gem 'nokogiri', '~> 1.11' gem 'nsa', '~> 0.2' -gem 'oj', '~> 3.10' +gem 'oj', '~> 3.11' gem 'ox', '~> 2.14' gem 'parslet' gem 'parallel', '~> 1.20' diff --git a/Gemfile.lock b/Gemfile.lock index dcd64001d0..28916d1dc6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -369,7 +369,7 @@ GEM concurrent-ruby (~> 1.0, >= 1.0.2) sidekiq (>= 3.5) statsd-ruby (~> 1.4, >= 1.4.0) - oj (3.10.18) + oj (3.11.0) omniauth (1.9.1) hashie (>= 3.4.6) rack (>= 1.6.2, < 3) @@ -749,7 +749,7 @@ DEPENDENCIES nilsimsa! nokogiri (~> 1.11) nsa (~> 0.2) - oj (~> 3.10) + oj (~> 3.11) omniauth (~> 1.9) omniauth-cas (~> 2.0) omniauth-rails_csrf_protection (~> 0.1) From 041a6f9242dab2ac03d22cbd4226d1155162f1b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Jan 2021 21:32:06 +0900 Subject: [PATCH 19/39] Bump webpack-assets-manifest from 4.0.0 to 4.0.1 (#15579) Bumps [webpack-assets-manifest](https://github.com/webdeveric/webpack-assets-manifest) from 4.0.0 to 4.0.1. - [Release notes](https://github.com/webdeveric/webpack-assets-manifest/releases) - [Commits](https://github.com/webdeveric/webpack-assets-manifest/compare/v4.0.0...v4.0.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 737d4acde2..7ebd74d38d 100644 --- a/package.json +++ b/package.json @@ -164,7 +164,7 @@ "tiny-queue": "^0.2.1", "uuid": "^8.3.1", "webpack": "^4.45.0", - "webpack-assets-manifest": "^4.0.0", + "webpack-assets-manifest": "^4.0.1", "webpack-bundle-analyzer": "^4.3.0", "webpack-cli": "^3.3.12", "webpack-merge": "^5.7.3", diff --git a/yarn.lock b/yarn.lock index 2e084f748e..13288444a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11053,10 +11053,10 @@ webidl-conversions@^6.1.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== -webpack-assets-manifest@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/webpack-assets-manifest/-/webpack-assets-manifest-4.0.0.tgz#6c906f6a77945aa326822e158f22d172ccc59f0f" - integrity sha512-zbozd1Cr6gS5XMWWHfISusocOO2bO05ktpJXWdoYtv12/FSXsNqyVjNwLE9ehBXDsEOwRtqd3kPDdTZKFjjD/w== +webpack-assets-manifest@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/webpack-assets-manifest/-/webpack-assets-manifest-4.0.1.tgz#918989c51a7800be6683aaa27b9f36bcc7a9afdc" + integrity sha512-NS7Bx2C3JsEj6a0MB/PPmPOD/BzDYjB3PaKcI7/r2fKXq0PuZ4YtcbZ5Og+q4gkmetGX9v21vejeAlbru/Fvhw== dependencies: chalk "^4.0" deepmerge "^4.2.2" From 77368d8ff9a6e282a1f584b0cc8616b908ccdd68 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Jan 2021 21:40:39 +0900 Subject: [PATCH 20/39] Bump strong_migrations from 0.7.4 to 0.7.6 (#15581) Bumps [strong_migrations](https://github.com/ankane/strong_migrations) from 0.7.4 to 0.7.6. - [Release notes](https://github.com/ankane/strong_migrations/releases) - [Changelog](https://github.com/ankane/strong_migrations/blob/master/CHANGELOG.md) - [Commits](https://github.com/ankane/strong_migrations/compare/v0.7.4...v0.7.6) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 28916d1dc6..caf1ec0f8a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -350,7 +350,7 @@ GEM mimemagic (0.3.5) mini_mime (1.0.2) mini_portile2 (2.5.0) - minitest (5.14.2) + minitest (5.14.3) msgpack (1.3.3) multi_json (1.15.0) multipart-post (2.1.1) @@ -612,7 +612,7 @@ GEM stoplight (2.2.1) streamio-ffmpeg (3.0.2) multi_json (~> 1.8) - strong_migrations (0.7.4) + strong_migrations (0.7.6) activerecord (>= 5) temple (0.8.2) terminal-table (2.0.0) From d8d75cd6c285f92863d150ed7176cad03264dd9c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Jan 2021 21:42:34 +0900 Subject: [PATCH 21/39] Bump sanitize from 5.2.2 to 5.2.3 (#15582) Bumps [sanitize](https://github.com/rgrove/sanitize) from 5.2.2 to 5.2.3. - [Release notes](https://github.com/rgrove/sanitize/releases) - [Changelog](https://github.com/rgrove/sanitize/blob/master/HISTORY.md) - [Commits](https://github.com/rgrove/sanitize/compare/v5.2.2...v5.2.3) 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 caf1ec0f8a..038566a5d4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -560,7 +560,7 @@ GEM fugit (~> 1.1, >= 1.1.6) safety_net_attestation (0.4.0) jwt (~> 2.0) - sanitize (5.2.2) + sanitize (5.2.3) crass (~> 1.0.2) nokogiri (>= 1.8.0) nokogumbo (~> 2.0) From e955ca5463dc399694455bc25301d56499a1b6ef Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 21 Jan 2021 06:18:30 +0100 Subject: [PATCH 22/39] Fix sign-up restrictions based on IP addresses not being enforced (#15607) Fixes #15606 Co-authored-by: Claire --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index f8c8a6ab55..b4508c2ebb 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -152,7 +152,7 @@ class User < ApplicationRecord def confirm new_user = !confirmed? - self.approved = true if open_registrations? + self.approved = true if open_registrations? && !sign_up_from_ip_requires_approval? super From a0e1c9a35bcf42ae7c697d398bb2b2bad8383899 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Jan 2021 21:46:16 +0900 Subject: [PATCH 23/39] Bump sass from 1.32.2 to 1.32.5 (#15603) Bumps [sass](https://github.com/sass/dart-sass) from 1.32.2 to 1.32.5. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/master/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.32.2...1.32.5) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7ebd74d38d..a3be05cfcb 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,7 @@ "requestidlecallback": "^0.3.0", "reselect": "^4.0.0", "rimraf": "^3.0.2", - "sass": "^1.32.2", + "sass": "^1.32.5", "sass-loader": "^10.1.1", "stacktrace-js": "^2.0.2", "stringz": "^2.1.0", diff --git a/yarn.lock b/yarn.lock index 13288444a9..2b9e31f965 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9518,10 +9518,10 @@ sass-loader@^10.1.1: schema-utils "^3.0.0" semver "^7.3.2" -sass@^1.32.2: - version "1.32.2" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.32.2.tgz#66dc0250bc86c15d19ddee7135e93d0cf3d3257b" - integrity sha512-u1pUuzqwz3SAgvHSWp1k0mRhX82b2DdlVnP6UIetQPZtYbuJUDaPQhZE12jyjB7vYeOScfz9WPsZJB6Rpk7heA== +sass@^1.32.5: + version "1.32.5" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.32.5.tgz#2882d22ad5748c05fa9bff6c3b0ffbc4f4b9e1dc" + integrity sha512-kU1yJ5zUAmPxr7f3q0YXTAd1oZjSR1g3tYyv+xu0HZSl5JiNOaE987eiz7wCUvbm4I9fGWGU2TgApTtcP4GMNQ== dependencies: chokidar ">=2.0.0 <4.0.0" From 71a019d63204217077e7b4cc1a215ac6de0cbab0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Jan 2021 21:46:37 +0900 Subject: [PATCH 24/39] Bump concurrent-ruby from 1.1.7 to 1.1.8 (#15601) Bumps [concurrent-ruby](https://github.com/ruby-concurrency/concurrent-ruby) from 1.1.7 to 1.1.8. - [Release notes](https://github.com/ruby-concurrency/concurrent-ruby/releases) - [Changelog](https://github.com/ruby-concurrency/concurrent-ruby/blob/master/CHANGELOG.md) - [Commits](https://github.com/ruby-concurrency/concurrent-ruby/compare/v1.1.7...v1.1.8) 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 038566a5d4..38174e0f7e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -155,7 +155,7 @@ GEM climate_control (>= 0.0.3, < 1.0) coderay (1.1.3) color_diff (0.1) - concurrent-ruby (1.1.7) + concurrent-ruby (1.1.8) connection_pool (2.2.3) cose (1.0.0) cbor (~> 0.5.9) From 0180682e21311f672c28bfc1100527d8db7c73b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Jan 2021 21:46:54 +0900 Subject: [PATCH 25/39] Bump webpack from 4.45.0 to 4.46.0 (#15580) Bumps [webpack](https://github.com/webpack/webpack) from 4.45.0 to 4.46.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v4.45.0...v4.46.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index a3be05cfcb..d5bee684f6 100644 --- a/package.json +++ b/package.json @@ -163,7 +163,7 @@ "throng": "^4.0.0", "tiny-queue": "^0.2.1", "uuid": "^8.3.1", - "webpack": "^4.45.0", + "webpack": "^4.46.0", "webpack-assets-manifest": "^4.0.1", "webpack-bundle-analyzer": "^4.3.0", "webpack-cli": "^3.3.12", diff --git a/yarn.lock b/yarn.lock index 2b9e31f965..cee68c4fd8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3968,10 +3968,10 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enhanced-resolve@^4.1.1, enhanced-resolve@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.3.0.tgz#3b806f3bfafc1ec7de69551ef93cca46c1704126" - integrity sha512-3e87LvavsdxyoCfGusJnrZ5G8SLPOFeHSNpZI/ATL9a5leXo2k0w6MKnbqhdBad9qTobSfB20Ld7UmgoNbAZkQ== +enhanced-resolve@^4.1.1, enhanced-resolve@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz#2f3cfd84dbe3b487f18f2db2ef1e064a571ca5ec" + integrity sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg== dependencies: graceful-fs "^4.1.2" memory-fs "^0.5.0" @@ -11175,10 +11175,10 @@ webpack-sources@^1.0, webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-so source-list-map "^2.0.0" source-map "~0.6.1" -webpack@^4.45.0: - version "4.45.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.45.0.tgz#bcdc1ddb43959adb47f8974e60d944027267c1be" - integrity sha512-JhDaVi4CbRcwLLAoqC7eugMSMJnZbIfE2AyjaZ19pnOIh/R2O/lXOiXA2tQFN0iXEcxgpPJsPJHW2wOWqiTLcw== +webpack@^4.46.0: + version "4.46.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.46.0.tgz#bf9b4404ea20a073605e0a011d188d77cb6ad542" + integrity sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q== dependencies: "@webassemblyjs/ast" "1.9.0" "@webassemblyjs/helper-module-context" "1.9.0" @@ -11188,7 +11188,7 @@ webpack@^4.45.0: ajv "^6.10.2" ajv-keywords "^3.4.1" chrome-trace-event "^1.0.2" - enhanced-resolve "^4.3.0" + enhanced-resolve "^4.5.0" eslint-scope "^4.0.3" json-parse-better-errors "^1.0.2" loader-runner "^2.4.0" From a47f001c12005e7fabd1bdfc9ccd17001b1a6a0f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Jan 2021 21:47:33 +0900 Subject: [PATCH 26/39] Bump eslint from 7.17.0 to 7.18.0 (#15569) Bumps [eslint](https://github.com/eslint/eslint) from 7.17.0 to 7.18.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v7.17.0...v7.18.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index d5bee684f6..bb9177d144 100644 --- a/package.json +++ b/package.json @@ -175,7 +175,7 @@ "@testing-library/react": "^11.2.3", "babel-eslint": "^10.1.0", "babel-jest": "^26.6.3", - "eslint": "^7.17.0", + "eslint": "^7.18.0", "eslint-plugin-import": "~2.22.1", "eslint-plugin-jsx-a11y": "~6.4.1", "eslint-plugin-promise": "~4.2.1", diff --git a/yarn.lock b/yarn.lock index cee68c4fd8..c240896a51 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1105,10 +1105,10 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.4.tgz#622a72bebd1e3f48d921563b4b60a762295a81fc" integrity sha512-6PYY5DVdAY1ifaQW6XYTnOMihmBVT27elqSjEoodchsGjzYlEsTQMcEhSud99kVawatyTZRTiVkJ/c6lwbQ7nA== -"@eslint/eslintrc@^0.2.2": - version "0.2.2" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.2.2.tgz#d01fc791e2fc33e88a29d6f3dc7e93d0cd784b76" - integrity sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ== +"@eslint/eslintrc@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.3.0.tgz#d736d6963d7003b6514e6324bec9c602ac340318" + integrity sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg== dependencies: ajv "^6.12.4" debug "^4.1.1" @@ -1117,7 +1117,7 @@ ignore "^4.0.6" import-fresh "^3.2.1" js-yaml "^3.13.1" - lodash "^4.17.19" + lodash "^4.17.20" minimatch "^3.0.4" strip-json-comments "^3.1.1" @@ -4309,13 +4309,13 @@ eslint@^2.7.0: text-table "~0.2.0" user-home "^2.0.0" -eslint@^7.17.0: - version "7.17.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.17.0.tgz#4ccda5bf12572ad3bf760e6f195886f50569adb0" - integrity sha512-zJk08MiBgwuGoxes5sSQhOtibZ75pz0J35XTRlZOk9xMffhpA9BTbQZxoXZzOl5zMbleShbGwtw+1kGferfFwQ== +eslint@^7.18.0: + version "7.18.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.18.0.tgz#7fdcd2f3715a41fe6295a16234bd69aed2c75e67" + integrity sha512-fbgTiE8BfUJZuBeq2Yi7J3RB3WGUQ9PNuNbmgi6jt9Iv8qrkxfy19Ds3OpL1Pm7zg3BtTVhvcUZbIRQ0wmSjAQ== dependencies: "@babel/code-frame" "^7.0.0" - "@eslint/eslintrc" "^0.2.2" + "@eslint/eslintrc" "^0.3.0" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" @@ -4339,7 +4339,7 @@ eslint@^7.17.0: js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" - lodash "^4.17.19" + lodash "^4.17.20" minimatch "^3.0.4" natural-compare "^1.4.0" optionator "^0.9.1" From 80469897883d4b008c2b0ef79a2a855268b69acc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Jan 2021 21:47:55 +0900 Subject: [PATCH 27/39] Bump react-select from 3.1.1 to 3.2.0 (#15571) Bumps [react-select](https://github.com/JedWatson/react-select) from 3.1.1 to 3.2.0. - [Release notes](https://github.com/JedWatson/react-select/releases) - [Changelog](https://github.com/JedWatson/react-select/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/JedWatson/react-select/compare/react-select@3.1.1...react-select@3.2.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index bb9177d144..cc88ee2c61 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "react-redux-loading-bar": "^4.0.8", "react-router-dom": "^4.1.1", "react-router-scroll-4": "^1.0.0-beta.1", - "react-select": "^3.1.1", + "react-select": "^3.2.0", "react-sparklines": "^1.7.0", "react-swipeable-views": "^0.13.9", "react-textarea-autosize": "^8.3.0", diff --git a/yarn.lock b/yarn.lock index c240896a51..1110d9dfc7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8745,10 +8745,10 @@ react-infinite-scroller@^1.0.12: dependencies: prop-types "^15.5.8" -react-input-autosize@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-2.2.2.tgz#fcaa7020568ec206bc04be36f4eb68e647c4d8c2" - integrity sha512-jQJgYCA3S0j+cuOwzuCd1OjmBmnZLdqQdiLKRYrsMMzbjUrVDS5RvJUDwJqA7sKuksDuzFtm6hZGKFu7Mjk5aw== +react-input-autosize@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-3.0.0.tgz#6b5898c790d4478d69420b55441fcc31d5c50a85" + integrity sha512-nL9uS7jEs/zu8sqwFE5MAPx6pPkNAriACQ2rGLlqmKr2sPGtN7TXTyDdQt4lbNXVx7Uzadb40x8qotIuru6Rhg== dependencies: prop-types "^15.5.8" @@ -8877,10 +8877,10 @@ react-router@^4.3.1: prop-types "^15.6.1" warning "^4.0.1" -react-select@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/react-select/-/react-select-3.1.1.tgz#156a5b4a6c22b1e3d62a919cb1fd827adb4060bc" - integrity sha512-HjC6jT2BhUxbIbxMZWqVcDibrEpdUJCfGicN0MMV+BQyKtCaPTgFekKWiOizSCy4jdsLMGjLqcFGJMhVGWB0Dg== +react-select@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/react-select/-/react-select-3.2.0.tgz#de9284700196f5f9b5277c5d850a9ce85f5c72fe" + integrity sha512-B/q3TnCZXEKItO0fFN/I0tWOX3WJvi/X2wtdffmwSQVRwg5BpValScTO1vdic9AxlUgmeSzib2hAZAwIUQUZGQ== dependencies: "@babel/runtime" "^7.4.4" "@emotion/cache" "^10.0.9" @@ -8888,7 +8888,7 @@ react-select@^3.1.1: "@emotion/css" "^10.0.9" memoize-one "^5.0.0" prop-types "^15.6.0" - react-input-autosize "^2.2.2" + react-input-autosize "^3.0.0" react-transition-group "^4.3.0" react-sparklines@^1.7.0: From 7d0031a515a9ccd552fab9ad55b6edb7e0e5ba32 Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 21 Jan 2021 14:29:54 +0100 Subject: [PATCH 28/39] Fix Google Translate breaking web interface (#15610) - marks the page as a whole as untranslatable - still marks user text as translatable Co-authored-by: Claire --- app/javascript/mastodon/components/status_content.js | 8 ++++---- .../mastodon/features/account/components/header.js | 6 +++--- .../features/getting_started/components/announcements.js | 2 +- app/views/home/index.html.haml | 2 +- app/views/public_timelines/show.html.haml | 2 +- app/views/tags/show.html.haml | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/javascript/mastodon/components/status_content.js b/app/javascript/mastodon/components/status_content.js index 185a2a663f..190ced1a80 100644 --- a/app/javascript/mastodon/components/status_content.js +++ b/app/javascript/mastodon/components/status_content.js @@ -221,14 +221,14 @@ export default class StatusContent extends React.PureComponent { return (
{mentionsPlaceholder} -
+
{!hidden && !!status.get('poll') && } @@ -238,7 +238,7 @@ export default class StatusContent extends React.PureComponent { } else if (this.props.onClick) { const output = [
-
+
{!!status.get('poll') && } @@ -254,7 +254,7 @@ export default class StatusContent extends React.PureComponent { } else { return (
-
+
{!!status.get('poll') && } diff --git a/app/javascript/mastodon/features/account/components/header.js b/app/javascript/mastodon/features/account/components/header.js index b47ebed62e..0b4431d625 100644 --- a/app/javascript/mastodon/features/account/components/header.js +++ b/app/javascript/mastodon/features/account/components/header.js @@ -328,9 +328,9 @@ class Header extends ImmutablePureComponent { ))} {fields.map((pair, i) => (
-
+
-
+
{pair.get('verified_at') && }
@@ -340,7 +340,7 @@ class Header extends ImmutablePureComponent { {account.get('id') !== me && !suspended && } - {account.get('note').length > 0 && account.get('note') !== '

' &&
} + {account.get('note').length > 0 && account.get('note') !== '

' &&
}
{!suspended && ( diff --git a/app/javascript/mastodon/features/getting_started/components/announcements.js b/app/javascript/mastodon/features/getting_started/components/announcements.js index 5bc3abac66..4534f7121d 100644 --- a/app/javascript/mastodon/features/getting_started/components/announcements.js +++ b/app/javascript/mastodon/features/getting_started/components/announcements.js @@ -145,7 +145,7 @@ class Content extends ImmutablePureComponent { return (
diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 94cc782b2b..3d6283fba1 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -8,7 +8,7 @@ = render_initial_state = javascript_pack_tag 'application', crossorigin: 'anonymous' -.app-holder#mastodon{ data: { props: Oj.dump(default_props) } } +.notranslate.app-holder#mastodon{ data: { props: Oj.dump(default_props) } } %noscript = image_pack_tag 'logo.svg', alt: 'Mastodon' diff --git a/app/views/public_timelines/show.html.haml b/app/views/public_timelines/show.html.haml index 3325be5bf1..9254bd3485 100644 --- a/app/views/public_timelines/show.html.haml +++ b/app/views/public_timelines/show.html.haml @@ -14,4 +14,4 @@ %p= t('about.browse_local_posts') #mastodon-timeline{ data: { props: Oj.dump(default_props.merge(local: !Setting.show_known_fediverse_at_about_page)) }} -#modal-container +.notranslate#modal-container diff --git a/app/views/tags/show.html.haml b/app/views/tags/show.html.haml index beeeb56f2d..5cd513b320 100644 --- a/app/views/tags/show.html.haml +++ b/app/views/tags/show.html.haml @@ -13,4 +13,4 @@ %p= t('about.about_hashtag_html', hashtag: @tag.name) #mastodon-timeline{ data: { props: Oj.dump(default_props.merge(hashtag: @tag.name, local: @local)) }} -#modal-container +.notranslate#modal-container From c48e2a48ba9a5e873be0deb506aaef4d5bc2426b Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 21 Jan 2021 14:29:54 +0100 Subject: [PATCH 29/39] [Glitch] Fix Google Translate breaking web interface Port 7d0031a515a9ccd552fab9ad55b6edb7e0e5ba32 to glitch-soc Co-authored-by: Claire Signed-off-by: Claire --- .../flavours/glitch/components/status_content.js | 8 ++++---- .../flavours/glitch/features/account/components/header.js | 8 ++++---- .../features/getting_started/components/announcements.js | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/javascript/flavours/glitch/components/status_content.js b/app/javascript/flavours/glitch/components/status_content.js index 76e2d79a55..61a28e9a76 100644 --- a/app/javascript/flavours/glitch/components/status_content.js +++ b/app/javascript/flavours/glitch/components/status_content.js @@ -327,7 +327,7 @@ export default class StatusContent extends React.PureComponent {
@@ -362,7 +362,7 @@ export default class StatusContent extends React.PureComponent { ref={this.setContentsRef} key={`contents-${tagLinks}-${rewriteMentions}`} dangerouslySetInnerHTML={content} - className='status__content__text' + className='status__content__text translate' tabIndex='0' /> {media} @@ -375,7 +375,7 @@ export default class StatusContent extends React.PureComponent { tabIndex='0' ref={this.setRef} > -
+
{media}
); diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js index 15515a99a7..6a572862d3 100644 --- a/app/javascript/flavours/glitch/features/account/components/header.js +++ b/app/javascript/flavours/glitch/features/account/components/header.js @@ -320,13 +320,13 @@ class Header extends ImmutablePureComponent {
{identity_proofs.map((proof, i) => (
-
+
- +
))} @@ -335,14 +335,14 @@ class Header extends ImmutablePureComponent {
- {pair.get('verified_at') && } + {pair.get('verified_at') && }
))}
)} - {account.get('note').length > 0 && account.get('note') !== '

' &&
} + {account.get('note').length > 0 && account.get('note') !== '

' &&
}
)} diff --git a/app/javascript/flavours/glitch/features/getting_started/components/announcements.js b/app/javascript/flavours/glitch/features/getting_started/components/announcements.js index cd81d07deb..1ab5d9ba69 100644 --- a/app/javascript/flavours/glitch/features/getting_started/components/announcements.js +++ b/app/javascript/flavours/glitch/features/getting_started/components/announcements.js @@ -145,7 +145,7 @@ class Content extends ImmutablePureComponent { return (
From eb51e43fb4386120f77f2ff99581f15018a81bd4 Mon Sep 17 00:00:00 2001 From: luigi <007.lva@gmail.com> Date: Fri, 22 Jan 2021 04:09:08 -0500 Subject: [PATCH 30/39] Optimize some regex matching (#15528) * Use Regex#match? * Replace =~ too * Avoid to call match? from Nil * Keep value of Regexp.last_match --- app/lib/extractor.rb | 8 ++++---- app/lib/feed_manager.rb | 6 +++--- app/lib/formatter.rb | 2 +- app/lib/request.rb | 2 +- app/lib/sanitize_config.rb | 6 +++--- app/models/concerns/omniauthable.rb | 2 +- app/services/account_search_service.rb | 2 +- app/services/search_service.rb | 2 +- app/validators/blacklisted_email_validator.rb | 2 +- app/validators/html_validator.rb | 2 +- config/initializers/open_uri_redirection.rb | 2 +- config/initializers/rack_attack.rb | 2 +- lib/mastodon/domains_cli.rb | 2 +- 13 files changed, 20 insertions(+), 20 deletions(-) diff --git a/app/lib/extractor.rb b/app/lib/extractor.rb index 479689d602..6076458ad6 100644 --- a/app/lib/extractor.rb +++ b/app/lib/extractor.rb @@ -7,14 +7,14 @@ module Extractor # :yields: username, list_slug, start, end def extract_mentions_or_lists_with_indices(text) - return [] unless text =~ Twitter::Regex[:at_signs] + return [] unless Twitter::Regex[:at_signs].match?(text) possible_entries = [] text.to_s.scan(Account::MENTION_RE) do |screen_name, _| match_data = $LAST_MATCH_INFO after = $' - unless after =~ Twitter::Regex[:end_mention_match] + unless Twitter::Regex[:end_mention_match].match?(after) start_position = match_data.char_begin(1) - 1 end_position = match_data.char_end(1) possible_entries << { @@ -33,7 +33,7 @@ module Extractor end def extract_hashtags_with_indices(text, **) - return [] unless text =~ /#/ + return [] unless /#/.match?(text) tags = [] text.scan(Tag::HASHTAG_RE) do |hash_text, _| @@ -41,7 +41,7 @@ module Extractor start_position = match_data.char_begin(1) - 1 end_position = match_data.char_end(1) after = $' - if after =~ %r{\A://} + if %r{\A://}.match?(after) hash_text.match(/(.+)(https?\Z)/) do |matched| hash_text = matched[1] end_position -= matched[2].char_length diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index f0ad3e21fe..165338437b 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -396,8 +396,8 @@ class FeedManager active_filters.map! do |filter| if filter.whole_word - sb = filter.phrase =~ /\A[[:word:]]/ ? '\b' : '' - eb = filter.phrase =~ /[[:word:]]\z/ ? '\b' : '' + sb = /\A[[:word:]]/.match?(filter.phrase) ? '\b' : '' + eb = /[[:word:]]\z/.match?(filter.phrase) ? '\b' : '' /(?mix:#{sb}#{Regexp.escape(filter.phrase)}#{eb})/ else @@ -417,7 +417,7 @@ class FeedManager status.media_attachments.map(&:description).join("\n\n"), ].compact.join("\n\n") - !combined_regex.match(combined_text).nil? + combined_regex.match?(combined_text) end # Adds a status to an account's feed, returning true if a status was diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index 7f217ae9f6..24a34a0594 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -222,7 +222,7 @@ class Formatter escaped = text.chars.map do |c| output = begin - if c.ord.to_s(16).length > 2 && UNICODE_ESCAPE_BLACKLIST_RE.match(c).nil? + if c.ord.to_s(16).length > 2 && !UNICODE_ESCAPE_BLACKLIST_RE.match?(c) CGI.escape(c) else c diff --git a/app/lib/request.rb b/app/lib/request.rb index 38048dad7b..125dee3ea7 100644 --- a/app/lib/request.rb +++ b/app/lib/request.rb @@ -145,7 +145,7 @@ class Request end def block_hidden_service? - !Rails.configuration.x.access_to_hidden_service && /\.(onion|i2p)$/.match(@url.host) + !Rails.configuration.x.access_to_hidden_service && /\.(onion|i2p)$/.match?(@url.host) end module ClientLimit diff --git a/app/lib/sanitize_config.rb b/app/lib/sanitize_config.rb index 8f700197b2..a2e1d9d01b 100644 --- a/app/lib/sanitize_config.rb +++ b/app/lib/sanitize_config.rb @@ -28,9 +28,9 @@ class Sanitize return unless class_list class_list.keep_if do |e| - next true if e =~ /^(h|p|u|dt|e)-/ # microformats classes - next true if e =~ /^(mention|hashtag)$/ # semantic classes - next true if e =~ /^(ellipsis|invisible)$/ # link formatting classes + next true if /^(h|p|u|dt|e)-/.match?(e) # microformats classes + next true if /^(mention|hashtag)$/.match?(e) # semantic classes + next true if /^(ellipsis|invisible)$/.match?(e) # link formatting classes end node['class'] = class_list.join(' ') diff --git a/app/models/concerns/omniauthable.rb b/app/models/concerns/omniauthable.rb index 4ea219537a..79d671d10a 100644 --- a/app/models/concerns/omniauthable.rb +++ b/app/models/concerns/omniauthable.rb @@ -57,7 +57,7 @@ module Omniauthable user = User.new(user_params_from_auth(email, auth)) - user.account.avatar_remote_url = auth.info.image if auth.info.image =~ /\A#{URI::DEFAULT_PARSER.make_regexp(%w(http https))}\z/ + user.account.avatar_remote_url = auth.info.image if /\A#{URI::DEFAULT_PARSER.make_regexp(%w(http https))}\z/.match?(auth.info.image) user.skip_confirmation! user.save! user diff --git a/app/services/account_search_service.rb b/app/services/account_search_service.rb index 43e5960405..6fe4b6593a 100644 --- a/app/services/account_search_service.rb +++ b/app/services/account_search_service.rb @@ -175,7 +175,7 @@ class AccountSearchService < BaseService end def username_complete? - query.include?('@') && "@#{query}" =~ /\A#{Account::MENTION_RE}\Z/ + query.include?('@') && "@#{query}".match?(/\A#{Account::MENTION_RE}\Z/) end def likely_acct? diff --git a/app/services/search_service.rb b/app/services/search_service.rb index 19500a8d46..1a76cbb388 100644 --- a/app/services/search_service.rb +++ b/app/services/search_service.rb @@ -72,7 +72,7 @@ class SearchService < BaseService end def url_query? - @resolve && @query =~ /\Ahttps?:\/\// + @resolve && /\Ahttps?:\/\//.match?(@query) end def url_resource_results diff --git a/app/validators/blacklisted_email_validator.rb b/app/validators/blacklisted_email_validator.rb index 16e3abf129..20a1587cc6 100644 --- a/app/validators/blacklisted_email_validator.rb +++ b/app/validators/blacklisted_email_validator.rb @@ -22,7 +22,7 @@ class BlacklistedEmailValidator < ActiveModel::Validator domains = Rails.configuration.x.email_domains_blacklist.gsub('.', '\.') regexp = Regexp.new("@(.+\\.)?(#{domains})", true) - @email =~ regexp + regexp.match?(@email) end def not_on_whitelist? diff --git a/app/validators/html_validator.rb b/app/validators/html_validator.rb index 1c9cd303cf..b85b9769fb 100644 --- a/app/validators/html_validator.rb +++ b/app/validators/html_validator.rb @@ -15,6 +15,6 @@ class HtmlValidator < ActiveModel::EachValidator def html_errors(str) fragment = Nokogiri::HTML.fragment(options[:wrap_with] ? "<#{options[:wrap_with]}>#{str}" : str) - fragment.errors.select { |error| ERROR_RE =~ error.message } + fragment.errors.select { |error| ERROR_RE.match?(error.message) } end end diff --git a/config/initializers/open_uri_redirection.rb b/config/initializers/open_uri_redirection.rb index e9de85bdc5..0e57c53c63 100644 --- a/config/initializers/open_uri_redirection.rb +++ b/config/initializers/open_uri_redirection.rb @@ -3,6 +3,6 @@ require 'open-uri' module OpenURI def self.redirectable?(uri1, uri2) # :nodoc: uri1.scheme.casecmp(uri2.scheme).zero? || - (/\A(?:http|https|ftp)\z/i =~ uri1.scheme && /\A(?:http|https|ftp)\z/i =~ uri2.scheme) + (/\A(?:http|https|ftp)\z/i.match?(uri1.scheme) && /\A(?:http|https|ftp)\z/i.match?(uri2.scheme)) end end diff --git a/config/initializers/rack_attack.rb b/config/initializers/rack_attack.rb index 6662ef40b0..c0db499072 100644 --- a/config/initializers/rack_attack.rb +++ b/config/initializers/rack_attack.rb @@ -78,7 +78,7 @@ class Rack::Attack API_DELETE_STATUS_REGEX = /\A\/api\/v1\/statuses\/[\d]+/.freeze throttle('throttle_api_delete', limit: 30, period: 30.minutes) do |req| - req.authenticated_user_id if (req.post? && req.path =~ API_DELETE_REBLOG_REGEX) || (req.delete? && req.path =~ API_DELETE_STATUS_REGEX) + req.authenticated_user_id if (req.post? && req.path.match?(API_DELETE_REBLOG_REGEX)) || (req.delete? && req.path.match?(API_DELETE_STATUS_REGEX)) end throttle('throttle_sign_up_attempts/ip', limit: 25, period: 5.minutes) do |req| diff --git a/lib/mastodon/domains_cli.rb b/lib/mastodon/domains_cli.rb index 3c2dfd4ec2..4ebd8a1e2c 100644 --- a/lib/mastodon/domains_cli.rb +++ b/lib/mastodon/domains_cli.rb @@ -93,7 +93,7 @@ module Mastodon work_unit = ->(domain) do next if stats.key?(domain) - next if options[:exclude_suspended] && domain.match(blocked_domains) + next if options[:exclude_suspended] && domain.match?(blocked_domains) stats[domain] = nil From 5fcac81302ad323a86ab43243c242c4a10cd338a Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 22 Jan 2021 10:09:23 +0100 Subject: [PATCH 31/39] =?UTF-8?q?Add=20=E2=80=9Ctranslate=E2=80=9D=20class?= =?UTF-8?q?=20to=20other=20user=20strings=20(#15611)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add “translate” class to other user strings Follow-up to #15610. Allow Google Translate to work on more user content: - poll options - reply indicator (contents of the status being replied to) - directory account cards - account note in follow requests list * Fix incorrect styling of account bio Co-authored-by: Claire --- app/javascript/mastodon/components/poll.js | 2 +- app/javascript/mastodon/features/account/components/header.js | 2 +- .../mastodon/features/compose/components/reply_indicator.js | 2 +- .../mastodon/features/directory/components/account_card.js | 2 +- .../features/follow_requests/components/account_authorize.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/javascript/mastodon/components/poll.js b/app/javascript/mastodon/components/poll.js index 41c99710fc..477f56e130 100644 --- a/app/javascript/mastodon/components/poll.js +++ b/app/javascript/mastodon/components/poll.js @@ -153,7 +153,7 @@ class Poll extends ImmutablePureComponent { } diff --git a/app/javascript/mastodon/features/account/components/header.js b/app/javascript/mastodon/features/account/components/header.js index 0b4431d625..4647b98b21 100644 --- a/app/javascript/mastodon/features/account/components/header.js +++ b/app/javascript/mastodon/features/account/components/header.js @@ -340,7 +340,7 @@ class Header extends ImmutablePureComponent { {account.get('id') !== me && !suspended && } - {account.get('note').length > 0 && account.get('note') !== '

' &&
} + {account.get('note').length > 0 && account.get('note') !== '

' &&
}
{!suspended && ( diff --git a/app/javascript/mastodon/features/compose/components/reply_indicator.js b/app/javascript/mastodon/features/compose/components/reply_indicator.js index 8563838932..a1d5c420cb 100644 --- a/app/javascript/mastodon/features/compose/components/reply_indicator.js +++ b/app/javascript/mastodon/features/compose/components/reply_indicator.js @@ -56,7 +56,7 @@ class ReplyIndicator extends ImmutablePureComponent {
-
+
{status.get('media_attachments').size > 0 && (
diff --git a/app/javascript/mastodon/features/follow_requests/components/account_authorize.js b/app/javascript/mastodon/features/follow_requests/components/account_authorize.js index a3b524db1d..8269f5ae43 100644 --- a/app/javascript/mastodon/features/follow_requests/components/account_authorize.js +++ b/app/javascript/mastodon/features/follow_requests/components/account_authorize.js @@ -35,7 +35,7 @@ class AccountAuthorize extends ImmutablePureComponent { -
+
From bc4efd5e98078946c1d62ad287361246ca571970 Mon Sep 17 00:00:00 2001 From: Daigo 3 Dango Date: Fri, 22 Jan 2021 09:09:40 +0000 Subject: [PATCH 32/39] Use libvpx >= 5 (#15591) Ubuntu 18.04 provides libvpx5 while Ubuntu 20.04 does libvpx6 --- Aptfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Aptfile b/Aptfile index 419d159ef6..b2cbad714d 100644 --- a/Aptfile +++ b/Aptfile @@ -22,7 +22,7 @@ libpixman-1-0 librsvg2-2 libthai-data libthai0 -libvpx5 +libvpx[5-9] libxcb-render0 libxcb-shm0 libxrender1 From 7ea9588520c664f17a02265d8456b2288476cb9b Mon Sep 17 00:00:00 2001 From: luigi <007.lva@gmail.com> Date: Fri, 22 Jan 2021 10:28:15 -0500 Subject: [PATCH 33/39] Use Enumerable#filter_map in more places (#15527) --- app/lib/spam_check.rb | 4 ++-- app/presenters/status_relationships_presenter.rb | 2 +- .../activitypub/fetch_featured_collection_service.rb | 7 ++----- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/app/lib/spam_check.rb b/app/lib/spam_check.rb index 68e586d00b..dcb2db9ca9 100644 --- a/app/lib/spam_check.rb +++ b/app/lib/spam_check.rb @@ -186,9 +186,9 @@ class SpamCheck def matching_status_ids if nilsimsa? - other_digests.select { |record| record.start_with?('nilsimsa') && nilsimsa_compare_value(digest, record.split(':')[1]) >= NILSIMSA_COMPARE_THRESHOLD }.filter_map { |record| record.split(':')[2] } + other_digests.filter_map { |record| record.split(':')[2] if record.start_with?('nilsimsa') && nilsimsa_compare_value(digest, record.split(':')[1]) >= NILSIMSA_COMPARE_THRESHOLD } else - other_digests.select { |record| record.start_with?('md5') && record.split(':')[1] == digest }.filter_map { |record| record.split(':')[2] } + other_digests.filter_map { |record| record.split(':')[2] if record.start_with?('md5') && record.split(':')[1] == digest } end end diff --git a/app/presenters/status_relationships_presenter.rb b/app/presenters/status_relationships_presenter.rb index f4849d245b..70fb2ba900 100644 --- a/app/presenters/status_relationships_presenter.rb +++ b/app/presenters/status_relationships_presenter.rb @@ -15,7 +15,7 @@ class StatusRelationshipsPresenter statuses = statuses.compact status_ids = statuses.flat_map { |s| [s.id, s.reblog_of_id] }.uniq.compact conversation_ids = statuses.filter_map(&:conversation_id).uniq - pinnable_status_ids = statuses.map(&:proper).select { |s| s.account_id == current_account_id && %w(public unlisted).include?(s.visibility) }.map(&:id) + pinnable_status_ids = statuses.map(&:proper).filter_map { |s| s.id if s.account_id == current_account_id && %w(public unlisted).include?(s.visibility) } @reblogs_map = Status.reblogs_map(status_ids, current_account_id).merge(options[:reblogs_map] || {}) @favourites_map = Status.favourites_map(status_ids, current_account_id).merge(options[:favourites_map] || {}) diff --git a/app/services/activitypub/fetch_featured_collection_service.rb b/app/services/activitypub/fetch_featured_collection_service.rb index 82c861f5b8..72352aca6f 100644 --- a/app/services/activitypub/fetch_featured_collection_service.rb +++ b/app/services/activitypub/fetch_featured_collection_service.rb @@ -23,11 +23,8 @@ class ActivityPub::FetchFeaturedCollectionService < BaseService def process_items(items) status_ids = items.map { |item| value_or_id(item) } - .reject { |uri| ActivityPub::TagManager.instance.local_uri?(uri) } - .filter_map { |uri| ActivityPub::FetchRemoteStatusService.new.call(uri) } - .select { |status| status.account_id == @account.id } - .map(&:id) - + .filter_map { |uri| ActivityPub::FetchRemoteStatusService.new.call(uri) unless ActivityPub::TagManager.instance.local_uri?(uri) } + .filter_map { |status| status.id if status.account_id == @account.id } to_remove = [] to_add = status_ids From 3ca089d4d76205b064c0ef17d13cb5003927fa2a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Jan 2021 23:25:08 +0900 Subject: [PATCH 34/39] Bump makara from 0.4.1 to 0.5.0 (#15578) Bumps [makara](https://github.com/taskrabbit/makara) from 0.4.1 to 0.5.0. - [Release notes](https://github.com/taskrabbit/makara/releases) - [Changelog](https://github.com/instacart/makara/blob/master/CHANGELOG.md) - [Commits](https://github.com/taskrabbit/makara/compare/v0.4.1...v0.5.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index f32e00ec88..aeb6d73ee7 100644 --- a/Gemfile +++ b/Gemfile @@ -13,7 +13,7 @@ gem 'rack', '~> 2.2.3' gem 'hamlit-rails', '~> 0.2' gem 'pg', '~> 1.2' -gem 'makara', '~> 0.4' +gem 'makara', '~> 0.5' gem 'pghero', '~> 2.7' gem 'dotenv-rails', '~> 2.7' diff --git a/Gemfile.lock b/Gemfile.lock index 38174e0f7e..516db5a321 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -333,7 +333,7 @@ GEM nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - makara (0.4.1) + makara (0.5.0) activerecord (>= 3.0.0) marcel (0.3.3) mimemagic (~> 0.3.2) @@ -740,7 +740,7 @@ DEPENDENCIES letter_opener_web (~> 1.4) link_header (~> 0.0) lograge (~> 0.11) - makara (~> 0.4) + makara (~> 0.5) mario-redis-lock (~> 1.2) memory_profiler microformats (~> 4.2) From 4f05a43f8fe1396b12efc14115a628751dafe5d4 Mon Sep 17 00:00:00 2001 From: Joe <401283+HTMLbyJoe@users.noreply.github.com> Date: Sun, 24 Jan 2021 03:14:35 -0500 Subject: [PATCH 35/39] Fix link to documentation repo (#15620) --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f7b8f17ccf..31f0a1319e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,4 +36,4 @@ The smaller the set of changes in the pull request is, the quicker it can be rev ## Documentation -The [Mastodon documentation](https://docs.joinmastodon.org) is a statically generated site. You can [submit merge requests to mastodon/docs](https://source.joinmastodon.org/mastodon/docs). +The [Mastodon documentation](https://docs.joinmastodon.org) is a statically generated site. You can [submit merge requests to tootsuite/documentation](https://github.com/tootsuite/documentation). From 7f1c56954b46b26b4dadfa92047f1ee5d7f9ad0a Mon Sep 17 00:00:00 2001 From: Takeshi Umeda Date: Mon, 25 Jan 2021 17:22:41 +0900 Subject: [PATCH 36/39] Fix first return value of FetchLinkCardService.html method (#15630) --- app/services/fetch_link_card_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb index 255490d5cd..74fe9a0a58 100644 --- a/app/services/fetch_link_card_service.rb +++ b/app/services/fetch_link_card_service.rb @@ -47,11 +47,11 @@ class FetchLinkCardService < BaseService Request.new(:get, @url).add_headers('Accept' => 'text/html', 'User-Agent' => Mastodon::Version.user_agent + ' Bot').perform do |res| if res.code == 200 && res.mime_type == 'text/html' - @html = res.body_with_limit @html_charset = res.charset + @html = res.body_with_limit else - @html = nil @html_charset = nil + @html = nil end end end From 00e55445b9aa5a399a9f8b76e42fde9da2c399fd Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 22 Jan 2021 10:09:23 +0100 Subject: [PATCH 37/39] =?UTF-8?q?[Glitch]=20Add=20=E2=80=9Ctranslate?= =?UTF-8?q?=E2=80=9D=20class=20to=20other=20user=20strings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port 5fcac81302ad323a86ab43243c242c4a10cd338a to glitch-soc Co-authored-by: Claire Signed-off-by: Claire --- app/javascript/flavours/glitch/components/poll.js | 2 +- .../glitch/features/compose/components/reply_indicator.js | 2 +- .../glitch/features/directory/components/account_card.js | 2 +- .../features/follow_requests/components/account_authorize.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/javascript/flavours/glitch/components/poll.js b/app/javascript/flavours/glitch/components/poll.js index 6f57c19509..f230823cc3 100644 --- a/app/javascript/flavours/glitch/components/poll.js +++ b/app/javascript/flavours/glitch/components/poll.js @@ -153,7 +153,7 @@ class Poll extends ImmutablePureComponent { } diff --git a/app/javascript/flavours/glitch/features/compose/components/reply_indicator.js b/app/javascript/flavours/glitch/features/compose/components/reply_indicator.js index 0fd07c282c..37ae9cab9b 100644 --- a/app/javascript/flavours/glitch/features/compose/components/reply_indicator.js +++ b/app/javascript/flavours/glitch/features/compose/components/reply_indicator.js @@ -66,7 +66,7 @@ class ReplyIndicator extends ImmutablePureComponent { )}
{attachments.size > 0 && ( diff --git a/app/javascript/flavours/glitch/features/directory/components/account_card.js b/app/javascript/flavours/glitch/features/directory/components/account_card.js index 2ef9d5ba40..5f952b3825 100644 --- a/app/javascript/flavours/glitch/features/directory/components/account_card.js +++ b/app/javascript/flavours/glitch/features/directory/components/account_card.js @@ -241,7 +241,7 @@ class AccountCard extends ImmutablePureComponent {
diff --git a/app/javascript/flavours/glitch/features/follow_requests/components/account_authorize.js b/app/javascript/flavours/glitch/features/follow_requests/components/account_authorize.js index bf145cb677..eb9f3db7e9 100644 --- a/app/javascript/flavours/glitch/features/follow_requests/components/account_authorize.js +++ b/app/javascript/flavours/glitch/features/follow_requests/components/account_authorize.js @@ -35,7 +35,7 @@ class AccountAuthorize extends ImmutablePureComponent { -
+
From ca6c62068e35537251cc650c8b2d03a1a2163d06 Mon Sep 17 00:00:00 2001 From: leo60228 Date: Sat, 23 Jan 2021 13:15:27 -0500 Subject: [PATCH 38/39] Support customizing poll option limits --- .env.production.sample | 6 ++++++ app/validators/poll_validator.rb | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.env.production.sample b/.env.production.sample index d51144d969..12ca64a066 100644 --- a/.env.production.sample +++ b/.env.production.sample @@ -254,6 +254,12 @@ MAX_PROFILE_FIELDS=4 # Maximum allowed display name characters MAX_DISPLAY_NAME_CHARS=30 +# Maximum allowed poll options +MAX_POLL_OPTIONS=5 + +# Maximum allowed poll option characters +MAX_POLL_OPTION_CHARS=100 + # Maximum image and video/audio upload sizes # Units are in bytes # 1048576 bytes equals 1 megabyte diff --git a/app/validators/poll_validator.rb b/app/validators/poll_validator.rb index 8259a62e56..1aaf5a5d02 100644 --- a/app/validators/poll_validator.rb +++ b/app/validators/poll_validator.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true class PollValidator < ActiveModel::Validator - MAX_OPTIONS = 5 - MAX_OPTION_CHARS = 100 + MAX_OPTIONS = (ENV['MAX_POLL_OPTIONS'] || 5).to_i + MAX_OPTION_CHARS = (ENV['MAX_POLL_OPTION_CHARS'] || 100).to_i MAX_EXPIRATION = 1.month.freeze MIN_EXPIRATION = 5.minutes.freeze From 7632255115a7f6e6f9f8047f0d0d1b90d7ee9315 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 27 Jan 2021 14:30:12 +0100 Subject: [PATCH 39/39] Change default site title to not point to dev.glitch.social --- config/settings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/settings.yml b/config/settings.yml index 96645c222b..1d94880529 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -2,7 +2,7 @@ # important settings can be changed from the admin interface. defaults: &defaults - site_title: 'dev.glitch.social' + site_title: 'Mastodon Glitch Edition' site_short_description: '' site_description: '' site_extended_description: ''