From f0359af35874b29d0e0db330598a8c36094c0d2e Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Wed, 3 Jun 2026 11:36:50 +0200 Subject: [PATCH 1/3] Change Mastodon gGmbH => Mastodon GmbH (#39261) --- app/javascript/mastodon/features/about/index.jsx | 2 +- app/javascript/mastodon/locales/en.json | 2 +- config/templates/terms-of-service.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/features/about/index.jsx b/app/javascript/mastodon/features/about/index.jsx index 85b76aee32..83f5bf6025 100644 --- a/app/javascript/mastodon/features/about/index.jsx +++ b/app/javascript/mastodon/features/about/index.jsx @@ -168,7 +168,7 @@ class About extends PureComponent {
-

+

diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 810fe1da94..8df8070ed1 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -2,7 +2,7 @@ "about.blocks": "Moderated servers", "about.contact": "Contact:", "about.default_locale": "Default", - "about.disclaimer": "Mastodon is free, open-source software, and a trademark of Mastodon gGmbH.", + "about.disclaimer": "Mastodon is free, open-source software, and a trademark of Mastodon GmbH.", "about.domain_blocks.no_reason_available": "Reason not available", "about.domain_blocks.preamble": "Mastodon generally allows you to view content from and interact with users from any other server in the fediverse. These are the exceptions that have been made on this particular server.", "about.domain_blocks.silenced.explanation": "You will generally not see profiles and content from this server, unless you explicitly look it up or opt into it by following.", diff --git a/config/templates/terms-of-service.md b/config/templates/terms-of-service.md index b2e32f76b9..348bf18701 100644 --- a/config/templates/terms-of-service.md +++ b/config/templates/terms-of-service.md @@ -4,7 +4,7 @@ These terms of service (the "Terms") cover your access and use of Server Operator's ("Administrator", "we", or "us") instance, located at %{domain} (the "Instance"). These Terms apply solely to your use of the Instance as operated by the Administrator. Please note that we have no affiliation with Mastodon -gGmbH (“Mastodon”) and these Terms do not contain any representations or +GmbH (“Mastodon”) and these Terms do not contain any representations or warranties or other promises from Mastodon about your use of the Instance. If you would like to contact us for any reason, please direct all questions, comments, concerns and notices to us by following the instructions provided in From c2daca655fb8b4667ff068a318f45066988fbaf3 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 3 Jun 2026 11:57:50 +0200 Subject: [PATCH 2/3] Merge commit from fork --- app/helpers/context_helper.rb | 2 +- app/services/activitypub/process_account_service.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/context_helper.rb b/app/helpers/context_helper.rb index 1677c2d02e..f7e74481b2 100644 --- a/app/helpers/context_helper.rb +++ b/app/helpers/context_helper.rb @@ -25,7 +25,7 @@ module ContextHelper memorial: { 'toot' => 'http://joinmastodon.org/ns#', 'memorial' => 'toot:memorial' }, voters_count: { 'toot' => 'http://joinmastodon.org/ns#', 'votersCount' => 'toot:votersCount' }, suspended: { 'toot' => 'http://joinmastodon.org/ns#', 'suspended' => 'toot:suspended' }, - attribution_domains: { 'toot' => 'http://joinmastodon.org/ns#', 'attributionDomains' => { '@id' => 'toot:attributionDomains', '@type' => '@id' } }, + attribution_domains: { 'toot' => 'http://joinmastodon.org/ns#', 'attributionDomains' => { '@id' => 'toot:attributionDomains', '@container' => '@set' } }, profile_settings: { 'toot' => 'http://joinmastodon.org/ns#', 'showFeatured' => 'toot:showFeatured', diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb index e616400c93..d4b38162a8 100644 --- a/app/services/activitypub/process_account_service.rb +++ b/app/services/activitypub/process_account_service.rb @@ -150,7 +150,7 @@ class ActivityPub::ProcessAccountService < BaseService @account.show_featured = @json['showFeatured'] if @json.key?('showFeatured') @account.show_media = @json['showMedia'] if @json.key?('showMedia') @account.show_media_replies = @json['showRepliesInMedia'] if @json.key?('showRepliesInMedia') - @account.attribution_domains = as_array(@json['attributionDomains'] || []).take(Account::ATTRIBUTION_DOMAINS_HARD_LIMIT).map { |item| value_or_id(item) } + @account.attribution_domains = as_array(@json['attributionDomains'] || []).take(Account::ATTRIBUTION_DOMAINS_HARD_LIMIT).filter { |item| item.is_a?(String) } end def set_fetchable_key! From 07236016bcc78a82205093b3e067bf4a1bb07d88 Mon Sep 17 00:00:00 2001 From: "Pia B." Date: Wed, 3 Jun 2026 12:12:37 +0200 Subject: [PATCH 3/3] Merge commit from fork * add guard clause to check for node attributes * check for encoding attribute specifically * check for encoding attribute specifically * change spec --- lib/sanitize_ext/sanitize_config.rb | 4 +++- spec/lib/sanitize/config_spec.rb | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/sanitize_ext/sanitize_config.rb b/lib/sanitize_ext/sanitize_config.rb index f30eec476c..3c3d697eda 100644 --- a/lib/sanitize_ext/sanitize_config.rb +++ b/lib/sanitize_ext/sanitize_config.rb @@ -83,8 +83,10 @@ class Sanitize # next, we find the plain-text description is_annotation_with_encoding = lambda do |encoding, node| return false unless node.name == 'annotation' + encoding_attr = node.attributes['encoding'] + return false if encoding_attr.nil? - node.attributes['encoding'].value == encoding + encoding_attr.value == encoding end annotation = semantics.children.find(&is_annotation_with_encoding.curry['application/x-tex']) diff --git a/spec/lib/sanitize/config_spec.rb b/spec/lib/sanitize/config_spec.rb index b4c849c427..7baa1423b7 100644 --- a/spec/lib/sanitize/config_spec.rb +++ b/spec/lib/sanitize/config_spec.rb @@ -38,6 +38,14 @@ RSpec.describe Sanitize::Config do expect(Sanitize.fragment('Test<a href="https://example.com">test</a>', subject)).to eq 'Test<a href="https://example.com">test</a>' end + it 'removes math when unparsable due to missing attributes' do + expect(Sanitize.fragment('x', subject)).to eq '' + end + + it 'removes math when unparsable due to missing encoding attribute' do + expect(Sanitize.fragment('x', subject)).to eq '' + end + it 'keeps a with href' do expect(Sanitize.fragment('Test', subject)).to eq 'Test' end