{"record":{"id":"e1912726057fd5b4","repo":"tinyhumansai/openhuman","slug":"browser-tool-is-enabled-but-no-allowed-domains-are","errorCode":null,"errorMessage":"Browser tool is enabled but no allowed_domains are configured. Add [browser].allowed_domains in config.toml","messagePattern":"Browser tool is enabled but no allowed_domains are configured\\. Add \\[browser\\]\\.allowed_domains in config\\.toml","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/tools/impl/browser/browser_open.rs","lineNumber":37,"sourceCode":"    }\n\n    fn validate_url(&self, raw_url: &str) -> 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(\"https://\") {\n            anyhow::bail!(\"Only https:// URLs are allowed\");\n        }\n\n        if self.allowed_domains.is_empty() {\n            anyhow::bail!(\n                \"Browser tool is enabled but no allowed_domains are configured. Add [browser].allowed_domains in config.toml\"\n            );\n        }\n\n        let host = extract_host(url)?;\n\n        if is_private_or_local_host(&host) {\n            anyhow::bail!(\"Blocked local/private host: {host}\");\n        }\n\n        if !host_matches_allowlist(&host, &self.allowed_domains) {\n            anyhow::bail!(\"Host '{host}' is not in browser.allowed_domains\");\n        }\n\n        Ok(url.to_string())\n    }\n}\n","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/browser/browser_open.rs#L19-L55","documentation":"validate_url fails when browser_open is enabled but no [browser].allowed_domains are configured. Unlike the automation tool there is no allow-all env escape; an empty allowlist makes every open out of policy, so the config gap is reported first.","triggerScenarios":"Thrown at src/openhuman/tools/impl/browser/browser_open.rs:37 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add [browser].allowed_domains entries in config.toml before using browser_open."],"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-14T05:17:10.506Z"}