From f20cf41c39ed4d1bfc2f3fcd401ee320e969a837 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Wed, 28 Jan 2026 14:39:32 +0100 Subject: [PATCH] fix --- src/config.rs | 2 +- src/error.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index bd3bc23..a7cbf94 100644 --- a/src/config.rs +++ b/src/config.rs @@ -188,7 +188,7 @@ impl FederationConfig { // TODO: Use is_global() once stabilized // https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_global let mut ips = lookup_host((domain.to_owned(), 80)).await?; - let allow_local = std::env::var("APUB_DANGER_ALLOW_LOCAL_IP").is_ok(); + let allow_local = std::env::var("DANGER_FEDERATION_ALLOW_LOCAL_IP").is_ok(); let invalid_ip = !allow_local && ips.any(|addr| match addr.ip() { IpAddr::V4(addr) => { diff --git a/src/error.rs b/src/error.rs index 1490c8c..07e377b 100644 --- a/src/error.rs +++ b/src/error.rs @@ -29,7 +29,7 @@ pub enum Error { #[error("URL failed verification: {0}")] UrlVerificationError(&'static str), /// Resolving domain points to local IP. - #[error("Resolving domain {0} points to local IP {1}. This may indicate an attacker attempting to access internal services. If intentional, you can ignore this error by setting DANGER_APUB_ALLOW_LOCAL_IP=1")] + #[error("Resolving domain {0} points to local IP {1}. This may indicate an attacker attempting to access internal services. If intentional, you can ignore this error by setting DANGER_FEDERATION_ALLOW_LOCAL_IP=1")] DomainResolveError(String, String), /// Incoming activity has invalid digest for body #[error("Incoming activity has invalid digest for body")]