mirror of
https://gitlab.com/famedly/conduit.git
synced 2025-08-06 17:40:59 +00:00
fix(media): only fetch remote media when requested by authenticated endpoints
this was already done for thumbnails, but I forgot to do so for full-sized media
(cherry picked from commit 7ddd32aeff
)
This commit is contained in:
parent
bb58e5a69a
commit
67090e5521
1 changed files with 2 additions and 2 deletions
|
@ -215,7 +215,7 @@ pub async fn get_content(
|
|||
content_type,
|
||||
content_disposition: Some(content_disposition),
|
||||
})
|
||||
} else if server_name != services().globals.server_name() && allow_remote {
|
||||
} else if server_name != services().globals.server_name() && allow_remote && authenticated {
|
||||
let remote_content_response = get_remote_content(server_name, media_id.clone()).await?;
|
||||
|
||||
Ok(get_content::v1::Response {
|
||||
|
@ -297,7 +297,7 @@ async fn get_content_as_filename(
|
|||
.with_filename(Some(filename.clone())),
|
||||
),
|
||||
})
|
||||
} else if server_name != services().globals.server_name() && allow_remote {
|
||||
} else if server_name != services().globals.server_name() && allow_remote && authenticated {
|
||||
let remote_content_response = get_remote_content(server_name, media_id.clone()).await?;
|
||||
|
||||
Ok(get_content_as_filename::v1::Response {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue