tinyhumansai/openhuman · error
URL userinfo is not allowed
Error message
URL userinfo is not allowed
What it means
extract_host rejects any URL whose authority contains '@' (userinfo). Userinfo in a URL can be used to smuggle a different real host past allowlist inspection (e.g. https://allowed.com@evil.com/), so it is refused before host extraction.
Source
Thrown at src/openhuman/tools/impl/browser/browser_open.rs:215
Some(d)
}
fn extract_host(url: &str) -> anyhow::Result<String> {
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");
}
View on GitHub (pinned to 7491200858)
Solutions
- Remove credentials/userinfo from the URL.
- Authenticate via the browser/session instead of embedding credentials in the URL.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/openhuman/tools/impl/browser/browser_open.rs:215 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/ee727292d964dd19.
Report an issue: GitHub.