mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
modules/federation/send: When origin field is used deny on mismatch.
This commit is contained in:
parent
94aebfb4bf
commit
94c9152061
1 changed files with 9 additions and 0 deletions
|
@ -141,6 +141,15 @@ handle_put(client &client,
|
|||
pdu_failures.count()
|
||||
};
|
||||
|
||||
if(origin && origin != request.origin)
|
||||
throw m::ACCESS_DENIED
|
||||
{
|
||||
"txn[%s] originating from '%s' not accepted when relayed by '%s'",
|
||||
txn_id,
|
||||
origin,
|
||||
request.origin,
|
||||
};
|
||||
|
||||
// Don't accept sends to ourself for whatever reason (i.e a 127.0.0.1
|
||||
// leaked into the target list). This should be a 500 so it's not
|
||||
// considered success or cached as failure by the sender's state.
|
||||
|
|
Loading…
Reference in a new issue