change forbidden_server_names and etc to allow regex patterns for wildcards
Signed-off-by: June Clementine Strawberry <june@3.dog>
This commit is contained in:
parent
ff276a42a3
commit
d5ad973464
13 changed files with 79 additions and 71 deletions
|
@ -426,7 +426,13 @@ fn check_fetch_authorized(&self, mxc: &Mxc<'_>) -> Result<()> {
|
|||
.server
|
||||
.config
|
||||
.prevent_media_downloads_from
|
||||
.contains(mxc.server_name)
|
||||
.is_match(mxc.server_name.host())
|
||||
|| self
|
||||
.services
|
||||
.server
|
||||
.config
|
||||
.forbidden_remote_server_names
|
||||
.is_match(mxc.server_name.host())
|
||||
{
|
||||
// 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