{"record":{"id":"95e51b0ca3ed36e2","repo":"zeroclaw-labs/zeroclaw","slug":"only-http-and-https-urls-are-allowed-95e51b","errorCode":null,"errorMessage":"Only http:// and https:// URLs are allowed","messagePattern":"Only http:// and https:// URLs are allowed","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-tools/src/web_fetch.rs","lineNumber":714,"sourceCode":"    raw_url: &str,\n    allowed_domains: &[String],\n    blocked_domains: &[String],\n    allowed_private_hosts: &[String],\n    tool_name: &str,\n    validate_dns: impl FnOnce(&str, bool) -> anyhow::Result<()>,\n) -> anyhow::Result<String> {\n    let url = raw_url.trim();\n\n    if url.is_empty() {\n        anyhow::bail!(\"URL cannot be empty\");\n    }\n\n    if url.chars().any(char::is_whitespace) {\n        anyhow::bail!(\"URL cannot contain whitespace\");\n    }\n\n    if !url.starts_with(\"http://\") && !url.starts_with(\"https://\") {\n        anyhow::bail!(\"Only http:// and https:// URLs are allowed\");\n    }\n\n    if allowed_domains.is_empty() {\n        anyhow::bail!(\n            \"{tool_name} tool is enabled but no allowed_domains are configured. \\\n             Add [{tool_name}].allowed_domains in config.toml\"\n        );\n    }\n\n    let host = extract_host(url)?;\n\n    // blocked_domains always takes precedence\n    if domain_guard::host_matches_allowlist(&host, blocked_domains) {\n        anyhow::bail!(\"Host '{host}' is in {tool_name}.blocked_domains\");\n    }\n\n    let host_is_private_or_local = domain_guard::is_private_or_local_host(&host);\n    let private_match = private_allowlist_match(&host, allowed_private_hosts);","sourceCodeStart":696,"sourceCodeEnd":732,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-tools/src/web_fetch.rs#L696-L732","documentation":"Error \"Only http:// and https:// URLs are allowed\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-tools/src/web_fetch.rs:714 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an http:// or https:// URL."],"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"}