From f70bdba9264bd7c572cee3c45421733919b7d03c Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 13 Dec 2022 19:41:53 +0100 Subject: [PATCH 01/11] Change default reply language to be default language when replying to a translated reply (#22272) Fixes #22250 --- app/javascript/mastodon/reducers/compose.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js index 1dafb07fd2..9496b56f87 100644 --- a/app/javascript/mastodon/reducers/compose.js +++ b/app/javascript/mastodon/reducers/compose.js @@ -330,8 +330,10 @@ export default function compose(state = initialState, action) { map.set('preselectDate', new Date()); map.set('idempotencyKey', uuid()); - if (action.status.get('language')) { + if (action.status.get('language') && !action.status.has('translation')) { map.set('language', action.status.get('language')); + } else { + map.set('language', state.get('default_language')); } if (action.status.get('spoiler_text').length > 0) { From 52a50c5e43a78f21a1054869352db31b4fa3aba0 Mon Sep 17 00:00:00 2001 From: cadars Date: Tue, 13 Dec 2022 19:43:03 +0100 Subject: [PATCH 02/11] Make handle more easily selectable on profile page (#21479) * Make handle more easily selectable on profile page * Wrap handle in a span * Add `user-select: all` to span * remove whitespace --- app/javascript/mastodon/features/account/components/header.js | 4 +++- app/javascript/styles/mastodon/components.scss | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/features/account/components/header.js b/app/javascript/mastodon/features/account/components/header.js index 5eb89c0ea0..f117412be8 100644 --- a/app/javascript/mastodon/features/account/components/header.js +++ b/app/javascript/mastodon/features/account/components/header.js @@ -342,7 +342,9 @@ class Header extends ImmutablePureComponent {

{badge} - @{acct} {lockedIcon} + + @{acct} {lockedIcon} +

diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index b56d43000d..1271fc7f3a 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -7092,6 +7092,10 @@ noscript { font-weight: 400; overflow: hidden; text-overflow: ellipsis; + + span { + user-select: all; + } } } } From 55b210b3e599fa51186a646572056cda7aa3f23c Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 13 Dec 2022 20:02:32 +0100 Subject: [PATCH 03/11] Fix crash and incorrect behavior in tootctl domains crawl (#19004) --- lib/mastodon/domains_cli.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/domains_cli.rb b/lib/mastodon/domains_cli.rb index a7c78c4a7a..77364ffbbe 100644 --- a/lib/mastodon/domains_cli.rb +++ b/lib/mastodon/domains_cli.rb @@ -97,7 +97,7 @@ module Mastodon failed = Concurrent::AtomicFixnum.new(0) start_at = Time.now.to_f seed = start ? [start] : Instance.pluck(:domain) - blocked_domains = Regexp.new('\\.?' + DomainBlock.where(severity: 1).pluck(:domain).join('|') + '$') + blocked_domains = /\.?(#{DomainBlock.where(severity: 1).pluck(:domain).map { |domain| Regexp.escape(domain) }.join('|')})$/ progress = create_progress_bar pool = Concurrent::ThreadPoolExecutor.new(min_threads: 0, max_threads: options[:concurrency], idletime: 10, auto_terminate: true, max_queue: 0) From 42e16ea52dcafef7737368b05537670cc49d3f91 Mon Sep 17 00:00:00 2001 From: Rin <36845451+AtelierSnek@users.noreply.github.com> Date: Wed, 14 Dec 2022 06:03:09 +1100 Subject: [PATCH 04/11] fix missing style in warning and strike cards (#22177) --- app/javascript/styles/mastodon/admin.scss | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/javascript/styles/mastodon/admin.scss b/app/javascript/styles/mastodon/admin.scss index 7a50a89bb6..2ed0d613ed 100644 --- a/app/javascript/styles/mastodon/admin.scss +++ b/app/javascript/styles/mastodon/admin.scss @@ -1665,6 +1665,15 @@ a.sparkline { box-sizing: border-box; min-height: 100%; + a { + text: &highlight-text-color; + text-decoration: none; + + &:hover { + text-decoration: underline; + } + } + p { margin-bottom: 20px; unicode-bidi: plaintext; From 09191dee66461fcec7ab8ed906c89410065529b2 Mon Sep 17 00:00:00 2001 From: zunda Date: Tue, 13 Dec 2022 19:03:16 +0000 Subject: [PATCH 05/11] Add single splat to callback method definitions to avoid ArgumentError (#22246) It looks like a [bug](https://bugs.ruby-lang.org/issues/18633) around autosplat is [fixed](https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/fbaadd1cfe7fbfd1b904f193f99d7c845a6ed804) on ruby-3.2.0-rc1 and breaks a test (but not on ruby <= 3.1.3): ``` $ bundle exec rspec ./spec/controllers/api/v1/emails/confirmations_controller_spec.rb:41 : 1) Api::V1::Emails::ConfirmationsController#create with an oauth token from an app that created the account when the account is already confirmed but user changed e-mail and has not confirmed it returns http success Failure/Error: def email_changed(user, **) @resource = user @instance = Rails.configuration.x.local_domain return unless @resource.active_for_authentication? I18n.with_locale(locale) do mail to: @resource.email, subject: I18n.t('devise.mailer.email_changed.subject') end end ArgumentError: wrong number of arguments (given 2, expected 1) # ./app/mailers/user_mailer.rb:51:in `email_changed' # ./app/models/user.rb:444:in `render_and_send_devise_message' # ./app/models/user.rb:430:in `block in send_pending_devise_notifications' # ./app/models/user.rb:429:in `each' # ./app/models/user.rb:429:in `send_pending_devise_notifications' # ./spec/controllers/api/v1/emails/confirmations_controller_spec.rb:38:in `block (7 levels) in ' ``` --- app/mailers/user_mailer.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 09e2b7c534..2889d13b53 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -11,7 +11,7 @@ class UserMailer < Devise::Mailer helper RoutingHelper - def confirmation_instructions(user, token, **) + def confirmation_instructions(user, token, *, **) @resource = user @token = token @instance = Rails.configuration.x.local_domain @@ -25,7 +25,7 @@ class UserMailer < Devise::Mailer end end - def reset_password_instructions(user, token, **) + def reset_password_instructions(user, token, *, **) @resource = user @token = token @instance = Rails.configuration.x.local_domain @@ -37,7 +37,7 @@ class UserMailer < Devise::Mailer end end - def password_change(user, **) + def password_change(user, *, **) @resource = user @instance = Rails.configuration.x.local_domain @@ -48,7 +48,7 @@ class UserMailer < Devise::Mailer end end - def email_changed(user, **) + def email_changed(user, *, **) @resource = user @instance = Rails.configuration.x.local_domain @@ -59,7 +59,7 @@ class UserMailer < Devise::Mailer end end - def two_factor_enabled(user, **) + def two_factor_enabled(user, *, **) @resource = user @instance = Rails.configuration.x.local_domain @@ -70,7 +70,7 @@ class UserMailer < Devise::Mailer end end - def two_factor_disabled(user, **) + def two_factor_disabled(user, *, **) @resource = user @instance = Rails.configuration.x.local_domain @@ -81,7 +81,7 @@ class UserMailer < Devise::Mailer end end - def two_factor_recovery_codes_changed(user, **) + def two_factor_recovery_codes_changed(user, *, **) @resource = user @instance = Rails.configuration.x.local_domain @@ -92,7 +92,7 @@ class UserMailer < Devise::Mailer end end - def webauthn_enabled(user, **) + def webauthn_enabled(user, *, **) @resource = user @instance = Rails.configuration.x.local_domain @@ -103,7 +103,7 @@ class UserMailer < Devise::Mailer end end - def webauthn_disabled(user, **) + def webauthn_disabled(user, *, **) @resource = user @instance = Rails.configuration.x.local_domain From 364f5f1f459b4bb6a0fe6cc261624ec73f214645 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Dec 2022 05:29:33 +0900 Subject: [PATCH 06/11] Bump prettier from 2.8.0 to 2.8.1 (#22255) Bumps [prettier](https://github.com/prettier/prettier) from 2.8.0 to 2.8.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.8.0...2.8.1) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] 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 1845facdea..943e30f11d 100644 --- a/package.json +++ b/package.json @@ -156,7 +156,7 @@ "jest": "^29.3.1", "jest-environment-jsdom": "^29.3.1", "postcss-scss": "^4.0.6", - "prettier": "^2.8.0", + "prettier": "^2.8.1", "raf": "^3.4.1", "react-intl-translations-manager": "^5.0.3", "react-test-renderer": "^16.14.0", diff --git a/yarn.lock b/yarn.lock index 17e6a5c269..1e1894a7c3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8624,10 +8624,10 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -prettier@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.0.tgz#c7df58393c9ba77d6fba3921ae01faf994fb9dc9" - integrity sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA== +prettier@^2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.1.tgz#4e1fd11c34e2421bc1da9aea9bd8127cd0a35efc" + integrity sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg== pretty-bytes@^5.3.0, pretty-bytes@^5.4.1: version "5.6.0" From 7e2d5e8aa78d6887cddff639f817c94739052fbe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Dec 2022 05:30:26 +0900 Subject: [PATCH 07/11] Bump sass from 1.56.1 to 1.56.2 (#22257) Bumps [sass](https://github.com/sass/dart-sass) from 1.56.1 to 1.56.2. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.56.1...1.56.2) --- updated-dependencies: - dependency-name: sass dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] 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 943e30f11d..5f84319a3c 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "requestidlecallback": "^0.3.0", "reselect": "^4.1.7", "rimraf": "^3.0.2", - "sass": "^1.56.1", + "sass": "^1.56.2", "sass-loader": "^10.2.0", "stacktrace-js": "^2.0.2", "stringz": "^2.1.0", diff --git a/yarn.lock b/yarn.lock index 1e1894a7c3..85332c45e0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9593,10 +9593,10 @@ sass-loader@^10.2.0: schema-utils "^3.0.0" semver "^7.3.2" -sass@^1.56.1: - version "1.56.1" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.56.1.tgz#94d3910cd468fd075fa87f5bb17437a0b617d8a7" - integrity sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ== +sass@^1.56.2: + version "1.56.2" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.56.2.tgz#9433b345ab3872996c82a53a58c014fd244fd095" + integrity sha512-ciEJhnyCRwzlBCB+h5cCPM6ie/6f8HrhZMQOf5vlU60Y1bI1rx5Zb0vlDZvaycHsg/MqFfF1Eq2eokAa32iw8w== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" From 062197a193d60aaf6df0eb67f989f5afe246df1c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Dec 2022 05:31:21 +0900 Subject: [PATCH 08/11] Bump public_suffix from 5.0.0 to 5.0.1 (#22259) Bumps [public_suffix](https://github.com/weppos/publicsuffix-ruby) from 5.0.0 to 5.0.1. - [Release notes](https://github.com/weppos/publicsuffix-ruby/releases) - [Changelog](https://github.com/weppos/publicsuffix-ruby/blob/main/CHANGELOG.md) - [Commits](https://github.com/weppos/publicsuffix-ruby/compare/v5.0.0...v5.0.1) --- updated-dependencies: - dependency-name: public_suffix dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] 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 46a6ad9ab5..30df1f1e63 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -481,7 +481,7 @@ GEM pry (>= 0.13, < 0.15) pry-rails (0.3.9) pry (>= 0.10.4) - public_suffix (5.0.0) + public_suffix (5.0.1) puma (5.6.5) nio4r (~> 2.0) pundit (2.2.0) From 44739096eca1080fe4af6b29552c2d417a63da01 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Dec 2022 05:34:07 +0900 Subject: [PATCH 09/11] Bump loofah from 2.19.0 to 2.19.1 (#22278) Bumps [loofah](https://github.com/flavorjones/loofah) from 2.19.0 to 2.19.1. - [Release notes](https://github.com/flavorjones/loofah/releases) - [Changelog](https://github.com/flavorjones/loofah/blob/main/CHANGELOG.md) - [Commits](https://github.com/flavorjones/loofah/compare/v2.19.0...v2.19.1) --- updated-dependencies: - dependency-name: loofah dependency-type: indirect ... Signed-off-by: dependabot[bot] 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 30df1f1e63..cb8a014552 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -382,7 +382,7 @@ GEM activesupport (>= 4) railties (>= 4) request_store (~> 1.0) - loofah (2.19.0) + loofah (2.19.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) From 1133e05e3da306460fa802c2bb78c25cc73ed9be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Dec 2022 05:41:34 +0900 Subject: [PATCH 10/11] Bump rails-html-sanitizer from 1.4.3 to 1.4.4 (#22279) Bumps [rails-html-sanitizer](https://github.com/rails/rails-html-sanitizer) from 1.4.3 to 1.4.4. - [Release notes](https://github.com/rails/rails-html-sanitizer/releases) - [Changelog](https://github.com/rails/rails-html-sanitizer/blob/master/CHANGELOG.md) - [Commits](https://github.com/rails/rails-html-sanitizer/compare/v1.4.3...v1.4.4) --- updated-dependencies: - dependency-name: rails-html-sanitizer dependency-type: indirect ... Signed-off-by: dependabot[bot] 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 cb8a014552..578a88436b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -525,8 +525,8 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.4.3) - loofah (~> 2.3) + rails-html-sanitizer (1.4.4) + loofah (~> 2.19, >= 2.19.1) rails-i18n (6.0.0) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 7) From a9bd5f65bbb6beea0048aed07c437ab65a764b41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Dec 2022 05:41:52 +0900 Subject: [PATCH 11/11] Bump postcss from 8.4.19 to 8.4.20 (#22256) Bumps [postcss](https://github.com/postcss/postcss) from 8.4.19 to 8.4.20. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.4.19...8.4.20) --- updated-dependencies: - dependency-name: postcss dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] 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 5f84319a3c..dd93102ed6 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "object.values": "^1.1.6", "path-complete-extname": "^1.0.0", "pg": "^8.5.0", - "postcss": "^8.4.19", + "postcss": "^8.4.20", "postcss-loader": "^3.0.0", "postcss-object-fit-images": "^1.1.2", "promise.prototype.finally": "^3.1.4", diff --git a/yarn.lock b/yarn.lock index 85332c45e0..abbd51eb9c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8583,10 +8583,10 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.27, postcss@^7.0.32: source-map "^0.6.1" supports-color "^6.1.0" -postcss@^8.2.15, postcss@^8.4.17, postcss@^8.4.19: - version "8.4.19" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.19.tgz#61178e2add236b17351897c8bcc0b4c8ecab56fc" - integrity sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA== +postcss@^8.2.15, postcss@^8.4.17, postcss@^8.4.20: + version "8.4.20" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.20.tgz#64c52f509644cecad8567e949f4081d98349dc56" + integrity sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g== dependencies: nanoid "^3.3.4" picocolors "^1.0.0"