aboutsummaryrefslogtreecommitdiffstats
path: root/src/tasks/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tasks/mod.rs')
-rw-r--r--src/tasks/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tasks/mod.rs b/src/tasks/mod.rs
index 362db80..c895a1b 100644
--- a/src/tasks/mod.rs
+++ b/src/tasks/mod.rs
@@ -122,6 +122,12 @@ async fn execute_audio_job(ctx: &CronContext, job: &crate::database::CronJob) {
122 // job may point at an arbitrary third-party URL and must never receive 122 // job may point at an arbitrary third-party URL and must never receive
123 // the password. 123 // the password.
124 let url = ctx.copyparty.build_url_for(audio_url); 124 let url = ctx.copyparty.build_url_for(audio_url);
125 if !ctx.copyparty.is_own_url(&url)
126 && let Err(e) = crate::net::ensure_public_http_url(&url).await
127 {
128 error!("Cron audio job {} refused URL: {e}", job.id);
129 return;
130 }
125 info!( 131 info!(
126 "Cron audio job {} playing: {}", 132 "Cron audio job {} playing: {}",
127 job.id, 133 job.id,