tinyhumansai/openhuman · error

IPv6 hosts are not supported in browser_open

Error message

IPv6 hosts are not supported in browser_open

What it means

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.

Source

Thrown at src/openhuman/tools/impl/browser/browser_open.rs:219

    let rest = url
        .strip_prefix("https://")
        .ok_or_else(|| anyhow::anyhow!("Only https:// URLs are allowed"))?;

    let authority = rest
        .split(['/', '?', '#'])
        .next()
        .ok_or_else(|| anyhow::anyhow!("Invalid URL"))?;

    if authority.is_empty() {
        anyhow::bail!("URL must include a host");
    }

    if authority.contains('@') {
        anyhow::bail!("URL userinfo is not allowed");
    }

    if authority.starts_with('[') {
        anyhow::bail!("IPv6 hosts are not supported in browser_open");
    }

    let host = authority
        .split(':')
        .next()
        .unwrap_or_default()
        .trim()
        .trim_end_matches('.')
        .to_lowercase();

    if host.is_empty() {
        anyhow::bail!("URL must include a valid host");
    }

    Ok(host)
}

fn host_matches_allowlist(host: &str, allowed_domains: &[String]) -> bool {

View on GitHub (pinned to 7491200858)

Solutions

  1. Use a DNS hostname instead of an IPv6 literal.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/tools/impl/browser/browser_open.rs:219 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/bb9bc0e9f9cd67f4. Report an issue: GitHub.