{"record":{"id":"afb3833ac668dc94","repo":"tinyhumansai/openhuman","slug":"only-http-and-https-urls-are-allowed","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":"src/openhuman/tools/impl/browser/browser.rs","lineNumber":297,"sourceCode":"        }\n    }\n\n    /// Validate URL against allowlist\n    fn validate_url(&self, url: &str) -> anyhow::Result<()> {\n        let url = url.trim();\n\n        if url.is_empty() {\n            anyhow::bail!(\"URL cannot be empty\");\n        }\n\n        // Block file:// URLs — browser file access bypasses all SSRF and\n        // domain-allowlist controls and can exfiltrate arbitrary local files.\n        if url.starts_with(\"file://\") {\n            anyhow::bail!(\"file:// URLs are not allowed in browser automation\");\n        }\n\n        if !url.starts_with(\"https://\") && !url.starts_with(\"http://\") {\n            anyhow::bail!(\"Only http:// and https:// URLs are allowed\");\n        }\n\n        if self.allowed_domains.is_empty() && !allow_all_browser_domains() {\n            anyhow::bail!(\n                \"Browser tool enabled but no allowed_domains configured. \\\n                Add [browser].allowed_domains in config.toml or set OPENHUMAN_BROWSER_ALLOW_ALL=1\"\n            );\n        }\n\n        let host = extract_host(url)?;\n\n        if is_private_host(&host) {\n            anyhow::bail!(\"Blocked local/private host: {host}\");\n        }\n\n        if !self.allowed_domains.is_empty() && !host_matches_allowlist(&host, &self.allowed_domains)\n        {\n            anyhow::bail!(\"Host '{host}' not in browser.allowed_domains\");","sourceCodeStart":279,"sourceCodeEnd":315,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/browser/browser.rs#L279-L315","documentation":"validate_url rejects any URL whose scheme is not http:// or https:// (checked after the file:// block). Only web schemes are automatable; schemes like ftp://, data:, or javascript: are refused as a hard boundary.","triggerScenarios":"Thrown at src/openhuman/tools/impl/browser/browser.rs:297 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a standard http:// or https:// URL.","Move data: payloads into tool arguments rather than URLs."],"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"}