diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-04 01:29:57 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-04 01:29:57 +0100 |
| commit | 4b2b4af606237def78273a42e881ae9f971cb505 (patch) | |
| tree | 47735062971b7dcddfbe3ad385ccbf2570fa6245 /src/commands/cron.rs | |
| parent | docker: install ImageMagick for image compress/convert (diff) | |
| download | senator-sperma-4b2b4af606237def78273a42e881ae9f971cb505.tar.gz senator-sperma-4b2b4af606237def78273a42e881ae9f971cb505.zip | |
net: block private and link-local URLs
Diffstat (limited to 'src/commands/cron.rs')
| -rw-r--r-- | src/commands/cron.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/commands/cron.rs b/src/commands/cron.rs index ebaa96d..301ae3d 100644 --- a/src/commands/cron.rs +++ b/src/commands/cron.rs | |||
| @@ -45,6 +45,9 @@ pub async fn dodaj_audio( | |||
| 45 | }; | 45 | }; |
| 46 | 46 | ||
| 47 | let guild_id = ctx.guild_id().ok_or_else(lang::err_not_in_guild)?; | 47 | let guild_id = ctx.guild_id().ok_or_else(lang::err_not_in_guild)?; |
| 48 | if !ctx.data().copyparty.is_own_url(&full_url) { | ||
| 49 | crate::net::ensure_public_http_url(&full_url).await?; | ||
| 50 | } | ||
| 48 | database::add_cron_job( | 51 | database::add_cron_job( |
| 49 | &ctx.data().db_pool, | 52 | &ctx.data().db_pool, |
| 50 | guild_id.get() as i64, | 53 | guild_id.get() as i64, |
