diff options
Diffstat (limited to 'src/commands/utilities.rs')
| -rw-r--r-- | src/commands/utilities.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/commands/utilities.rs b/src/commands/utilities.rs index c26fd0e..7a2e65d 100644 --- a/src/commands/utilities.rs +++ b/src/commands/utilities.rs | |||
| @@ -496,6 +496,11 @@ async fn run_download( | |||
| 496 | fformat: Option<&str>, | 496 | fformat: Option<&str>, |
| 497 | filename_user: Option<&str>, | 497 | filename_user: Option<&str>, |
| 498 | ) -> Result<()> { | 498 | ) -> Result<()> { |
| 499 | // Copyparty may legitimately live on localhost/LAN; every other host must | ||
| 500 | // be public. This blocks metadata endpoints and internal services. | ||
| 501 | if !ctx.data().copyparty.is_own_url(url) { | ||
| 502 | crate::net::ensure_public_http_url(url).await?; | ||
| 503 | } | ||
| 499 | let fmt = fformat.unwrap_or("mp4"); | 504 | let fmt = fformat.unwrap_or("mp4"); |
| 500 | let is_audio = matches!(fmt, "mp3" | "wav" | "m4a"); | 505 | let is_audio = matches!(fmt, "mp3" | "wav" | "m4a"); |
| 501 | let dl_dir = format!("{}/dl_{}", crate::config::TEMP_PATH, uuid::Uuid::new_v4()); | 506 | let dl_dir = format!("{}/dl_{}", crate::config::TEMP_PATH, uuid::Uuid::new_v4()); |
