mirror of
https://github.com/matrix-construct/construct
synced 2024-06-25 21:38:18 +02:00
ircd:Ⓜ️:fetch: Fix overzealous condition preventing authoritative redaction.
This commit is contained in:
parent
7299b15c6f
commit
214af71f09
|
@ -955,7 +955,7 @@ ircd::m::fetch::_check_event(const request &request,
|
|||
&& json::get<"origin"_>(event) == request.origin
|
||||
};
|
||||
|
||||
if(authoritative_redaction)
|
||||
if(authoritative_redaction || !mismatch_hashes)
|
||||
conforms.del(m::event::conforms::MISMATCH_HASHES);
|
||||
|
||||
thread_local char buf[128];
|
||||
|
|
|
@ -259,6 +259,7 @@ try
|
|||
opts.op = m::fetch::op::auth;
|
||||
opts.room_id = room.room_id;
|
||||
opts.event_id = room.event_id;
|
||||
opts.check_hashes = false;
|
||||
|
||||
// Figure out a remote hint as the primary target to request the missing
|
||||
// auth events from; if provided, m::fetch will ask this remote first. We
|
||||
|
@ -347,11 +348,6 @@ try
|
|||
opts.warnlog &= ~vm::fault::EXISTS;
|
||||
opts.notify_servers = false;
|
||||
|
||||
// The auth_chain fetch made by the caller won't give us events with
|
||||
// a content hash mismatch unless they were obtained from an authoritative
|
||||
// source. For this we can unconditionally allow hash mismatch from here.
|
||||
opts.redacted = 1;
|
||||
|
||||
log::debug
|
||||
{
|
||||
log, "Evaluating auth chain for %s in %s events:%zu",
|
||||
|
|
Loading…
Reference in a new issue