Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ad4c798
Fix profile editor spacing after rebase
diondiondion Oct 5, 2026
7007e35
Update dependency `sanitize`
ClearlyClaire Oct 28, 2026
b2b97ed
Update dependency `pghero`
ClearlyClaire Oct 28, 2026
b7f4852
Update dependency `css_parser`
ClearlyClaire Oct 28, 2026
d9cf22f
Update dependency `aws-sdk-s3`
ClearlyClaire Oct 28, 2026
c530851
Federate local collection item revocation (#40930)
oneiros Oct 7, 2026
21d6eda
Fix error in `dev:populate_sample_data` task (#40995)
isidzukuri Oct 12, 2026
9646b20
Extract `visibility_scope` method to re-use existing scopes in `Accou…
mjankowski Oct 9, 2026
8d1f1b9
Fix account timeline with `exclude_direct` also excluding followers-o…
ClearlyClaire Oct 13, 2026
f112d40
Avoid double constant warning from dev rake spec (#41051)
mjankowski Oct 14, 2026
a7d19ae
Reduce number of queries to DB from StatusCacheHydrator (#41079)
isidzukuri Oct 15, 2026
9f0fc97
Fix slow hashtag timelines with any[] when using min_id (#41132)
hugogameiro Oct 19, 2026
83c4819
Update dependency `excon`
ClearlyClaire Oct 28, 2026
9b0edf6
Send a security code challenge to users that try to long in after a l…
jhbabon Oct 5, 2026
c08bda2
Bump ruby version
ClearlyClaire Oct 28, 2026
8a254b6
New Crowdin translations
web-flow Oct 29, 2026
4123b61
Fix cross-domain redirects breaking origin-based security model
ClearlyClaire Oct 27, 2026
125b3b6
Hardening
ClearlyClaire Oct 28, 2026
d04059f
Bump version to v4.7.4
ClearlyClaire Oct 29, 2026
5a8ab93
Merge tag 'v4.7.4' into update/imastodon-v4.7.4
takayamaki Oct 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup-ruby/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ runs:
${{ inputs.additional-system-dependencies }}

- name: Set up Ruby
uses: ruby/setup-ruby@6e5d382445ae5590b7449d8b3bc8cb1c2c27f617 # v1
uses: ruby/setup-ruby@7f797815d8adceb1c412e7abefdd1ab4abc47a5f # v1.335.0
with:
ruby-version: ${{ inputs.ruby-version }}
bundler-cache: true
2 changes: 1 addition & 1 deletion .github/workflows/bundler-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6

- name: Set up Ruby
uses: ruby/setup-ruby@6e5d382445ae5590b7449d8b3bc8cb1c2c27f617 # v1
uses: ruby/setup-ruby@7f797815d8adceb1c412e7abefdd1ab4abc47a5f # v1.335.0
with:
bundler-cache: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-haml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6

- name: Set up Ruby
uses: ruby/setup-ruby@6e5d382445ae5590b7449d8b3bc8cb1c2c27f617 # v1
uses: ruby/setup-ruby@7f797815d8adceb1c412e7abefdd1ab4abc47a5f # v1.335.0
with:
bundler-cache: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6

- name: Set up Ruby
uses: ruby/setup-ruby@6e5d382445ae5590b7449d8b3bc8cb1c2c27f617 # v1
uses: ruby/setup-ruby@7f797815d8adceb1c412e7abefdd1ab4abc47a5f # v1.335.0
with:
bundler-cache: true

Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.6
4.0.9
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

All notable changes to this project will be documented in this file.

## [4.7.4] - 2026-10-29

### Security

- Fix insufficient ActivityPub identifier verification ([GHSA-288h-6j8h-6x5j](https://github.com/mastodon/mastodon/security/advisories/GHSA-288h-6j8h-6x5j))
- Added security challenge e-mail to users that try to log in after long period of inactivity (#40745 by @jhbabon)
- Updated dependencies, in particular to address security advisories in Ruby, NodeJS, `excon`, `css_parser`, `pghero`, and `sanitize`

### Fixed

- Fix inefficiency in some hashtag timeline queries (#41132 by @hugogameiro)
- Fix minor inefficiency in timeline deliveries (#41079 by @isidzukuri)
- Fix account timeline with `exclude_direct` also excluding followers-only posts for non-followed users (#41019 by @ClearlyClaire)
- Fix error in `dev:populate_sample_data` task (#40995 and #41051 by @isidzukuri and @mjankowski)
- Fix local collection item revocation not being properly federated (#40930 by @oneiros)

## [4.7.3] - 2026-10-01

### Security
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ARG BASE_REGISTRY="docker.io"

# Ruby image to use for base image, change with [--build-arg RUBY_VERSION="4.0.x"]
# renovate: datasource=docker depName=docker.io/ruby
ARG RUBY_VERSION="4.0.6"
ARG RUBY_VERSION="4.0.9"
# # Node.js version to use in base image, change with [--build-arg NODE_MAJOR_VERSION="22"]
# renovate: datasource=node-version depName=node
ARG NODE_MAJOR_VERSION="24"
Expand Down
20 changes: 10 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ GEM
activesupport (>= 6.0.0)
ast (2.4.3)
attr_required (1.0.2)
aws-eventstream (1.4.0)
aws-eventstream (1.4.1)
aws-partitions (1.1279.0)
aws-sdk-core (3.257.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-sdk-core (3.261.0)
aws-eventstream (~> 1, >= 1.4.1)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
base64
Expand All @@ -112,8 +112,8 @@ GEM
aws-sdk-kms (1.130.0)
aws-sdk-core (~> 3, >= 3.254.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.232.3)
aws-sdk-core (~> 3, >= 3.256.0)
aws-sdk-s3 (1.235.0)
aws-sdk-core (~> 3, >= 3.258.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sdk-ssm (1.186.0)
Expand Down Expand Up @@ -185,7 +185,7 @@ GEM
crack (1.0.1)
bigdecimal
rexml
crass (1.0.7)
crass (1.0.8)
css_parser (3.3.0)
addressable
base64
Expand Down Expand Up @@ -236,7 +236,7 @@ GEM
erubi (1.13.1)
et-orbi (1.4.1)
tzinfo
excon (1.7.0)
excon (1.8.0)
logger
fabrication (3.0.0)
faker (3.8.0)
Expand Down Expand Up @@ -600,7 +600,7 @@ GEM
pastel (0.8.0)
tty-color (~> 0.5)
pg (1.6.3)
pghero (4.0.1)
pghero (4.1.0)
activerecord (>= 7.2)
playwright-ruby-client (1.62.0)
base64
Expand Down Expand Up @@ -815,8 +815,8 @@ GEM
fugit (~> 1.1, >= 1.11.1)
safety_net_attestation (0.5.0)
jwt (>= 2.0, < 4.0)
sanitize (7.0.0)
crass (~> 1.0.2)
sanitize (7.0.1)
crass (~> 1.0.8)
nokogiri (>= 1.16.8)
scenic (1.9.0)
activerecord (>= 4.0.0)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# frozen_string_literal: true

module Admin
class Users::SignInTokenAuthenticationsController < BaseController
before_action :set_target_user

def create
authorize @user, :enable_sign_in_token?
@user.enable_sign_in_token!
log_action :enable_sign_in_token, @user
redirect_to admin_account_path(@user.account_id)
end

def destroy
authorize @user, :disable_sign_in_token?
@user.disable_sign_in_token!
log_action :disable_sign_in_token, @user
redirect_to admin_account_path(@user.account_id)
end

private

def set_target_user
@user = User.find(params[:user_id])
end
end
end
3 changes: 2 additions & 1 deletion app/controllers/auth/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class Auth::SessionsController < Devise::SessionsController
prepend_before_action :check_suspicious!, only: [:create]

include Auth::TwoFactorAuthenticationConcern
include Auth::SignInTokenAuthenticationConcern

content_security_policy only: :new do |p|
p.form_action(false)
Expand Down Expand Up @@ -62,7 +63,7 @@ def find_user_from_params
end

def user_params
params.expect(user: [:email, :password, :otp_attempt, credential: {}])
params.expect(user: [:email, :password, :otp_attempt, :sign_in_token_attempt, credential: {}])
end

def after_sign_in_path_for(resource)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# frozen_string_literal: true

module Auth::SignInTokenAuthenticationConcern
extend ActiveSupport::Concern

included do
prepend_before_action :authenticate_with_sign_in_token, if: :sign_in_token_required?, only: [:create]
end

def sign_in_token_required?
find_user&.suspicious_inactive_sign_in?
end

def authenticate_with_sign_in_token
user = self.resource = find_user

if params.key?(:sign_in_token_resend) && session[:attempt_user_id]
prompt_for_sign_in_token(user, resend: true)
elsif user_params[:sign_in_token_attempt].present? && session[:attempt_user_id]
authenticate_with_sign_in_token_attempt(user)
elsif user.present? && user.valid_password?(user_params[:password])
prompt_for_sign_in_token(user)
end
end

def authenticate_with_sign_in_token_attempt(user)
if user.valid_sign_in_token?(user_params[:sign_in_token_attempt])
clear_attempt_from_session
sign_in(user)
else
flash.now[:alert] = I18n.t('users.invalid_sign_in_token')
prompt_for_sign_in_token(user)
end
end

def prompt_for_sign_in_token(user, resend: false)
if resend || user.sign_in_token_expired?
user.generate_sign_in_token && user.save
UserMailer.sign_in_token(user, request.remote_ip, request.user_agent, Time.now.utc.to_s).deliver_later!
end

register_attempt_in_session(user)
render :sign_in_token
end
end
19 changes: 11 additions & 8 deletions app/helpers/json_ld_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,19 +236,19 @@ def safe_for_forwarding?(original, compacted)

# Fetch the resource given by uri.
# @param uri [String]
# @param id_is_known [Boolean]
# @param allow_redirects [Boolean]
# @param on_behalf_of [nil, Account]
# @param raise_on_error [Symbol<:all, :temporary, :none>] See {#fetch_resource_without_id_validation} for possible values
def fetch_resource(uri, id_is_known, on_behalf_of = nil, raise_on_error: :none, request_options: {})
unless id_is_known
json = fetch_resource_without_id_validation(uri, on_behalf_of, raise_on_error: raise_on_error)
def fetch_resource(uri, allow_redirects: false, on_behalf_of: nil, raise_on_error: :none, request_options: {})
if allow_redirects
json = fetch_resource_without_id_validation(uri, on_behalf_of: on_behalf_of, raise_on_error: raise_on_error)

return if !json.is_a?(Hash) || unsupported_uri_scheme?(json['id'])

uri = json['id']
end

json = fetch_resource_without_id_validation(uri, on_behalf_of, raise_on_error: raise_on_error, request_options: request_options)
json = fetch_resource_without_id_validation(uri, allow_redirects: false, on_behalf_of: on_behalf_of, raise_on_error: raise_on_error, request_options: request_options)
json.present? && json['id'] == uri ? json : nil
end

Expand All @@ -264,21 +264,24 @@ def fetch_resource(uri, id_is_known, on_behalf_of = nil, raise_on_error: :none,
#
# @param uri [String]
# @param on_behalf_of [nil, Account]
# @param allow_redirects [Boolean]
# @param raise_on_error [Symbol<:all, :temporary, :none>]
# - +:all+ - raise if response code is not in the 2xx range
# - +:temporary+ - raise if the response code is not an "unsalvageable error" like a 404
# (see {#response_error_unsalvageable} )
# - +:none+ - do not raise, return +nil+
def fetch_resource_without_id_validation(uri, on_behalf_of = nil, raise_on_error: :none, request_options: {})
def fetch_resource_without_id_validation(uri, allow_redirects: true, on_behalf_of: nil, raise_on_error: :none, request_options: {})
on_behalf_of ||= Account.representative

request_options = request_options.merge(follow: false) unless allow_redirects

build_request(uri, on_behalf_of, options: request_options).perform do |response|
raise Mastodon::UnexpectedResponseError, response if !response_successful?(response) && (
raise_on_error == :all ||
(!response_error_unsalvageable?(response) && raise_on_error == :temporary)
)

body_to_json(response.body_with_limit) if response.code == 200 && valid_activitypub_content_type?(response)
body_to_json(response.body_with_limit) if response.code == 200 && valid_activitypub_content_type?(response) && (allow_redirects || response.uri.to_s == uri)
end
end

Expand Down Expand Up @@ -345,7 +348,7 @@ def fetch_collection_page(collection_or_uri, reference_uri: nil, on_behalf_of: n
return collection_or_uri if collection_or_uri.is_a?(Hash)
return if !reference_uri.nil? && non_matching_uri_hosts?(reference_uri, collection_or_uri)

fetch_resource_without_id_validation(collection_or_uri, on_behalf_of, raise_on_error: :temporary)
fetch_resource_without_id_validation(collection_or_uri, on_behalf_of: on_behalf_of, raise_on_error: :temporary)
end

def valid_activitypub_content_type?(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

.avatar {
margin-top: -64px;
margin-left: calc(var(--space-4) - 2px);
margin-left: calc(var(--space-md) - 2px);
position: relative;
width: 82px;

Expand Down Expand Up @@ -251,7 +251,7 @@
// Section component

.section {
padding: var(--space-6) var(--space-4);
padding: var(--space-xl) var(--space-md);
border-bottom: 1px solid var(--color-border-primary);
font-size: 15px;

Expand Down
20 changes: 10 additions & 10 deletions app/javascript/mastodon/locales/be.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
"account_edit.custom_fields.reorder_button": "Змяніць парадак палёў",
"account_edit.custom_fields.tip_content": "Вы можаце лёгка дадаць даверу да свайго ўліковага запісу Mastodon пацвярджэннем спасылак на любы з Вашых сайтаў.",
"account_edit.custom_fields.tip_title": "Падказка: Дадаванне пацверджаных спасылак",
"account_edit.custom_fields.title": "Адвольныя палі",
"account_edit.custom_fields.title": "Уласныя палі",
"account_edit.custom_fields.verified_hint": "Як мне дадаць пацверджаную спасылку?",
"account_edit.display_name.add_label": "Дадаць бачнае імя",
"account_edit.display_name.edit_label": "Рэдагаваць бачнае імя",
Expand All @@ -180,23 +180,23 @@
"account_edit.featured_hashtags.title": "Выбраныя хэштэгі",
"account_edit.field_actions.delete": "Выдаліць поле",
"account_edit.field_actions.edit": "Рэдагаваць поле",
"account_edit.field_delete_modal.confirm": "Вы ўпэўненыя, што хочаце выдаліць гэтае адвольнае поле? Гэтае дзеянне будзе незваротным.",
"account_edit.field_delete_modal.confirm": "Вы ўпэўненыя, што хочаце выдаліць гэтае ўласнае поле? Гэтае дзеянне будзе незваротным.",
"account_edit.field_delete_modal.delete_button": "Выдаліць",
"account_edit.field_delete_modal.title": "Выдаліць адвольнае поле?",
"account_edit.field_edit_modal.add_title": "Дадаць адвольнае поле",
"account_edit.field_delete_modal.title": "Выдаліць уласнае поле?",
"account_edit.field_edit_modal.add_title": "Дадаць уласнае поле",
"account_edit.field_edit_modal.discard_confirm": "Адхіліць",
"account_edit.field_edit_modal.discard_message": "У Вас ёсць незахаваныя змены. Вы сапраўды хочаце адхіліць іх?",
"account_edit.field_edit_modal.edit_title": "Рэдагаваць адвольнае поле",
"account_edit.field_edit_modal.edit_title": "Рэдагаваць уласнае поле",
"account_edit.field_edit_modal.length_warning": "Перавышаны рэкамендаваны ліміт сімвалаў. Карыстальнікі мабільных прылад могуць не пабачыць Вашае поле цалкам.",
"account_edit.field_edit_modal.link_emoji_warning": "Мы раім не ўжываць адвольныя эмодзі разам з url-спасылкамі. Адвольныя палі, якія ўтрымліваюць і тое, і другое, будуць адлюстраваныя выключна як тэкст, а не спасылкі, каб не блытаць карыстальнікаў.",
"account_edit.field_edit_modal.link_emoji_warning": "Мы раім не ўжываць уласныя эмодзі разам з url-спасылкамі. Уласныя палі, якія ўтрымліваюць і тое, і другое, будуць адлюстраваныя выключна як тэкст, а не спасылкі, каб не блытаць карыстальнікаў.",
"account_edit.field_edit_modal.name_hint": "Напрыклад, \"Асабісты Сайт\"",
"account_edit.field_edit_modal.name_label": "Назва",
"account_edit.field_edit_modal.url_warning": "Каб дадаць спасылку, калі ласка, дадайце {protocol} у яе пачатку.",
"account_edit.field_edit_modal.value_hint": "Напрыклад, “https://example.me”",
"account_edit.field_edit_modal.value_label": "Значэнне",
"account_edit.field_reorder_modal.drag_cancel": "Перасоўванне адмененае. Поле {item} было павернутае на месца.",
"account_edit.field_reorder_modal.drag_end": "Поле {item} было павернутае на месца.",
"account_edit.field_reorder_modal.drag_instructions": "Каб змяніць парадак адвольных палёў, націсніце прабел або ўвод. Падчас перасоўвання карыстайцеся клавішамі са стрэлкамі, каб пасунуць поле ўверх ці ўніз. Націсніце прабел ці ўвод зноў, каб замацаваць поле на новым месцы, або націсніце Esc, каб скасаваць дзеянне.",
"account_edit.field_reorder_modal.drag_instructions": "Каб змяніць парадак уласных палёў, націсніце прабел або ўвод. Падчас перасоўвання карыстайцеся клавішамі са стрэлкамі, каб пасунуць поле ўверх ці ўніз. Націсніце прабел ці ўвод зноў, каб замацаваць поле на новым месцы, або націсніце Esc, каб скасаваць дзеянне.",
"account_edit.field_reorder_modal.drag_move": "Поле {item} было перасунутае.",
"account_edit.field_reorder_modal.drag_over": "Поле {item} было перасунутае над \"{over}\".",
"account_edit.field_reorder_modal.drag_start": "Абранае поле \"{item}\".",
Expand Down Expand Up @@ -250,8 +250,8 @@
"account_edit.verified_modal.invisible_link.details": "Дадайце спасылку ў свой загаловак. Важнай часткай з'яўляецца rel=\"me\", яна прадухіляе выдачу сябе за іншую асобу на сайтах з карыстальніцкім кантэнтам. Вы нават можаце выкарыстоўваць тэг link у загалоўку старонкі замест {tag}, але HTML код павінен быць даступным без выканання JavaScript.",
"account_edit.verified_modal.invisible_link.summary": "Як мне зрабіць спасылку нябачнай?",
"account_edit.verified_modal.step1.header": "Скапіруйце HTML код знізу і ўстаўце яго ў загаловак свайго сайту",
"account_edit.verified_modal.step2.details": "Калі Вы ўжо дадалі свой сайт у якасці адвольнага поля, Вам спатрэбіцца яго выдаліць і зноў дадаць, каб запусціць верыфікацыю.",
"account_edit.verified_modal.step2.header": "Дадаць свой сайт як адвольнае поле",
"account_edit.verified_modal.step2.details": "Калі Вы ўжо дадалі свой сайт у якасці ўласнага поля, Вам спатрэбіцца яго выдаліць і зноў дадаць, каб запусціць верыфікацыю.",
"account_edit.verified_modal.step2.header": "Дадаць свой сайт як уласнае поле",
"account_edit.verified_modal.title": "Як дадаць пацверджаную спасылку",
"account_edit_tags.add_tag": "Дадаць #{tagName}",
"account_edit_tags.column_title": "Рэдагаваць тэгі",
Expand Down Expand Up @@ -627,7 +627,7 @@
"embed.preview": "Вось як гэта будзе выглядаць:",
"emoji_button.activity": "Актыўнасць",
"emoji_button.clear": "Ачысціць",
"emoji_button.custom": "Адвольныя",
"emoji_button.custom": "Уласныя",
"emoji_button.flags": "Сцягі",
"emoji_button.food": "Ежа і напоі",
"emoji_button.label": "Уставіць эмодзі",
Expand Down
Loading
Loading