{"record":{"id":"86e2a5d2b5442379","repo":"tinyhumansai/openhuman","slug":"only-https-urls-are-allowed","errorCode":null,"errorMessage":"Only https:// URLs are allowed","messagePattern":"Only https:// URLs are allowed","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/tools/impl/browser/browser_open.rs","lineNumber":33,"sourceCode":"        Self {\n            security,\n            allowed_domains: normalize_allowed_domains(allowed_domains),\n        }\n    }\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","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/browser/browser_open.rs#L15-L51","documentation":"validate_url requires https:// for browser_open (stricter than the automation tool). The tool hands the URL to a real user-facing browser with no DOM sandbox, so cleartext http and other schemes are disallowed.","triggerScenarios":"Thrown at src/openhuman/tools/impl/browser/browser_open.rs:33 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an https:// URL.","Open http URLs manually in the browser if strictly needed."],"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"}