optimize config denylists

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-10-22 06:21:57 +00:00 committed by strawberry
parent d35376a90c
commit ca57dc7928
5 changed files with 20 additions and 30 deletions

View file

@ -382,8 +382,7 @@ fn check_fetch_authorized(&self, mxc: &Mxc<'_>) -> Result<()> {
.server
.config
.prevent_media_downloads_from
.iter()
.any(|entry| entry == mxc.server_name)
.contains(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.