forbid requesting room directories or media of forbidden servers
This commit is contained in:
parent
371103fb35
commit
81a797945b
4 changed files with 13 additions and 1 deletions
|
@ -427,6 +427,10 @@ fn check_fetch_authorized(&self, mxc: &Mxc<'_>) -> Result<()> {
|
|||
.config
|
||||
.prevent_media_downloads_from
|
||||
.contains(mxc.server_name)
|
||||
|| self
|
||||
.services
|
||||
.moderation
|
||||
.is_remote_server_forbidden(mxc.server_name)
|
||||
{
|
||||
// we'll lie to the client and say the blocked server's media was not found and
|
||||
// log. the client has no way of telling anyways so this is a security bonus.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue