{"record":{"id":"bb9bc0e9f9cd67f4","repo":"tinyhumansai/openhuman","slug":"ipv6-hosts-are-not-supported-in-browser-open","errorCode":null,"errorMessage":"IPv6 hosts are not supported in browser_open","messagePattern":"IPv6 hosts are not supported in browser_open","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/tools/impl/browser/browser_open.rs","lineNumber":219,"sourceCode":"    let rest = url\n        .strip_prefix(\"https://\")\n        .ok_or_else(|| anyhow::anyhow!(\"Only https:// URLs are allowed\"))?;\n\n    let authority = rest\n        .split(['/', '?', '#'])\n        .next()\n        .ok_or_else(|| anyhow::anyhow!(\"Invalid URL\"))?;\n\n    if authority.is_empty() {\n        anyhow::bail!(\"URL must include a host\");\n    }\n\n    if authority.contains('@') {\n        anyhow::bail!(\"URL userinfo is not allowed\");\n    }\n\n    if authority.starts_with('[') {\n        anyhow::bail!(\"IPv6 hosts are not supported in browser_open\");\n    }\n\n    let host = authority\n        .split(':')\n        .next()\n        .unwrap_or_default()\n        .trim()\n        .trim_end_matches('.')\n        .to_lowercase();\n\n    if host.is_empty() {\n        anyhow::bail!(\"URL must include a valid host\");\n    }\n\n    Ok(host)\n}\n\nfn host_matches_allowlist(host: &str, allowed_domains: &[String]) -> bool {","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/browser/browser_open.rs#L201-L237","documentation":"extract_host rejects bracketed IPv6 authority literals. The allowlist matcher compares lowercase hostnames, and IPv6 literals are not supported by that matching or by the private-host classification used here, so they are refused explicitly.","triggerScenarios":"Thrown at src/openhuman/tools/impl/browser/browser_open.rs:219 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a DNS hostname instead of an IPv6 literal."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}