Fix: LD Signaturesで署名された投稿の検索許可(検索範囲)が改竄できる問題

This commit is contained in:
KMY 2024-09-10 06:51:26 +09:00
parent ec9644b9a6
commit b6278e0d39
6 changed files with 39 additions and 13 deletions

View file

@ -564,7 +564,7 @@ RSpec.describe ActivityPub::Activity::Create do
end
context 'with direct' do
let(:searchable_by) { '' }
let(:searchable_by) { 'https://example.com/actor' }
it 'create status' do
status = sender.statuses.first
@ -574,6 +574,17 @@ RSpec.describe ActivityPub::Activity::Create do
end
end
context 'with empty array' do
let(:searchable_by) { '' }
it 'create status' do
status = sender.statuses.first
expect(status).to_not be_nil
expect(status.searchability).to be_nil
end
end
context 'with direct when not specify' do
let(:searchable_by) { nil }