{"record":{"id":"8483d0d9b7454868","repo":"zeroclaw-labs/zeroclaw","slug":"ipv6-hosts-are-not-supported-in-web-fetch","errorCode":null,"errorMessage":"IPv6 hosts are not supported in web_fetch","messagePattern":"IPv6 hosts are not supported in web_fetch","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-tools/src/web_fetch.rs","lineNumber":820,"sourceCode":"            ::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Reject)\n                .with_outcome(::zeroclaw_log::EventOutcome::Failure)\n                .with_attrs(::serde_json::json!({\"url\": url})),\n            \"web_fetch: non-http(s) URL rejected\"\n        );\n        anyhow::bail!(\"Only http:// and https:// URLs are allowed\");\n    }\n\n    if !parsed.username().is_empty() || parsed.password().is_some() {\n        anyhow::bail!(\"URL userinfo is not allowed\");\n    }\n\n    let host = parsed\n        .host_str()\n        .ok_or_else(|| anyhow::Error::msg(\"URL must include a host\"))?;\n    // `Url::host_str()` serializes IPv6 literals with brackets, so parsing the\n    // returned string directly would never recognize them.\n    if host.starts_with('[') {\n        anyhow::bail!(\"IPv6 hosts are not supported in web_fetch\");\n    }\n\n    let host = host.trim_end_matches('.').to_ascii_lowercase();\n\n    if host.is_empty() {\n        anyhow::bail!(\"URL must include a valid host\");\n    }\n\n    Ok(host)\n}\n\n#[derive(Debug, Clone, Copy, PartialEq, Eq)]\nenum PrivateAllow {\n    /// Not covered by the private allowlist.\n    None,\n    /// Covered only by a `*` wildcard entry.\n    Wildcard,\n    /// Covered by a specific host/IP or suffix entry.","sourceCodeStart":802,"sourceCodeEnd":838,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-tools/src/web_fetch.rs#L802-L838","documentation":"Error \"IPv6 hosts are not supported in web_fetch\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-tools/src/web_fetch.rs:820 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an IPv4 address or a DNS hostname that resolves to IPv4 instead of a literal IPv6 address.","Add a DNS name for the IPv6 host and fetch via that hostname."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}