Merge pull request #3567 from glitch-soc/glitch-soc/merge-upstream
Merge upstream changes up to 163f96cee4
This commit is contained in:
5 files changed
+99
-5
No files matched your search
@@ -2,6 +2,31 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [4.6.3] - 2026-07-03
|
||||
|
||||
### Security
|
||||
|
||||
- Update dependencies
|
||||
|
||||
### Added
|
||||
|
||||
- Add “Update available” navigation item at top of navbar when new Mastodon versions are available (#39705 by @ClearlyClaire)
|
||||
- Add rendering of post images in emails (#39636 by @diondiondion)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix “view collection” menu item appearing on collection page (#39694 by @mkljczk)
|
||||
- Fix incorrect filter cache key sometimes causing incorrect filters to be applied (#39698 by @ClearlyClaire)
|
||||
- Fix missing `to_json` to publish announcement reaction worker (#39685 by @mjankowski)
|
||||
- Fix duplicate "clear" button shown in main search input in Chrome (#39679 by @diondiondion)
|
||||
- Fix visual glitch with the spoiler button (#39677 by @ChaosExAnima)
|
||||
- Fix invisible username during post highlight animation (#39659 by @diondiondion)
|
||||
- Fix follow button floating on profiles when overview landing page is enabled (#39650 by @FFederi)
|
||||
- Fix encryption warning "read more" link (#39635 by @thomas-pike)
|
||||
- Fix `tootctl media lookup` failing on some setups (#39615 by @brookmiles)
|
||||
- Fix visible transparent navigation link borders in Windows forced-contrast mode (#39614 by @diondiondion)
|
||||
- Fix crash with some browser extensions injecting custom elements in the page (#39507 by @OriginalRoOhi)
|
||||
|
||||
## [4.6.2] - 2026-06-25
|
||||
|
||||
### Security
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class MigrateLocalAccountKeypairs < ActiveRecord::Migration[8.1]
|
||||
disable_ddl_transaction!
|
||||
|
||||
class Account < ApplicationRecord
|
||||
has_many :keypairs, inverse_of: :account
|
||||
|
||||
scope :local, -> { where(domain: nil) }
|
||||
end
|
||||
|
||||
class Keypair < ApplicationRecord
|
||||
self.inheritance_column = nil
|
||||
|
||||
encrypts :private_key
|
||||
|
||||
belongs_to :account
|
||||
|
||||
enum :type, {
|
||||
rsa: 0,
|
||||
}, validate: true
|
||||
end
|
||||
|
||||
def up
|
||||
Account.reset_column_information
|
||||
Keypair.reset_column_information
|
||||
|
||||
Account.local.where.not(private_key: nil).in_batches do |accounts|
|
||||
Keypair.upsert_all(
|
||||
accounts.map do |account|
|
||||
{
|
||||
type: :rsa,
|
||||
account_id: account.id,
|
||||
local_fragment: '#main-key',
|
||||
public_key: account.public_key,
|
||||
private_key: account.private_key,
|
||||
}
|
||||
end,
|
||||
unique_by: [:account_id, :local_fragment]
|
||||
)
|
||||
|
||||
accounts.update_all(public_key: '', private_key: nil)
|
||||
end
|
||||
|
||||
Account.reset_column_information
|
||||
Keypair.reset_column_information
|
||||
end
|
||||
|
||||
def down
|
||||
Account.reset_column_information
|
||||
Keypair.reset_column_information
|
||||
|
||||
Account.local.where(private_key: nil).find_each do |account|
|
||||
keypair = account.keypairs.find_by(local_fragment: '#main-key')
|
||||
next if keypair.nil?
|
||||
|
||||
account.update(public_key: keypair.public_key, private_key: keypair.private_key)
|
||||
keypair.delete
|
||||
end
|
||||
|
||||
Account.reset_column_information
|
||||
Keypair.reset_column_information
|
||||
end
|
||||
end
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.1].define(version: 2026_07_01_161826) do
|
||||
ActiveRecord::Schema[8.1].define(version: 2026_07_02_144128) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_catalog.plpgsql"
|
||||
|
||||
|
||||
+3
-3
@@ -60,7 +60,7 @@ services:
|
||||
web:
|
||||
# You can uncomment the following line if you want to not use the prebuilt image, for example if you have local code changes
|
||||
# build: .
|
||||
image: ghcr.io/glitch-soc/mastodon:v4.6.2
|
||||
image: ghcr.io/glitch-soc/mastodon:v4.6.3
|
||||
restart: always
|
||||
env_file: .env.production
|
||||
command: bundle exec puma -C config/puma.rb
|
||||
@@ -84,7 +84,7 @@ services:
|
||||
# build:
|
||||
# dockerfile: ./streaming/Dockerfile
|
||||
# context: .
|
||||
image: ghcr.io/glitch-soc/mastodon-streaming:v4.6.2
|
||||
image: ghcr.io/glitch-soc/mastodon-streaming:v4.6.3
|
||||
restart: always
|
||||
env_file: .env.production
|
||||
command: node ./streaming/index.js
|
||||
@@ -103,7 +103,7 @@ services:
|
||||
sidekiq:
|
||||
# You can uncomment the following line if you want to not use the prebuilt image, for example if you have local code changes
|
||||
# build: .
|
||||
image: ghcr.io/glitch-soc/mastodon:v4.6.2
|
||||
image: ghcr.io/glitch-soc/mastodon:v4.6.3
|
||||
restart: always
|
||||
env_file: .env.production
|
||||
command: bundle exec sidekiq
|
||||
|
||||
@@ -51,11 +51,16 @@ namespace :tests do
|
||||
exit(1)
|
||||
end
|
||||
|
||||
if Account.find(Account::INSTANCE_ACTOR_ID).private_key.blank?
|
||||
if Account.find(Account::INSTANCE_ACTOR_ID).keypair.blank?
|
||||
puts 'Instance actor does not have a private key'
|
||||
exit(1)
|
||||
end
|
||||
|
||||
if Account.local.where.not(private_key: nil).exists?
|
||||
puts 'Private keys not properly migrated'
|
||||
exit(1)
|
||||
end
|
||||
|
||||
unless Account.find_by(username: 'user', domain: nil).custom_filters.map { |filter| filter.keywords.pluck(:keyword) } == [['test'], ['take']]
|
||||
puts 'CustomFilterKeyword records not created as expected'
|
||||
exit(1)
|
||||
|
||||
Reference in new issue
Block a user