{"record":{"id":"9a029723490b9442","repo":"tinyhumansai/openhuman","slug":"dest-path-cannot-be-empty","errorCode":null,"errorMessage":"dest_path cannot be empty","messagePattern":"dest_path cannot be empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/tools/impl/network/curl.rs","lineNumber":55,"sourceCode":"        timeout_secs: u64,\n    ) -> Self {\n        Self {\n            security,\n            allowed_domains: normalize_allowed_domains(allowed_domains),\n            workspace_dir,\n            dest_subdir: sanitize_dest_subdir(&dest_subdir),\n            max_download_bytes,\n            timeout_secs,\n        }\n    }\n\n    /// Resolve a user-supplied dest path to an absolute path inside\n    /// `<workspace>/<dest_subdir>`. Rejects absolute paths, `..`\n    /// segments, and any other escape attempts.\n    fn resolve_dest(&self, dest: &str) -> anyhow::Result<PathBuf> {\n        let trimmed = dest.trim();\n        if trimmed.is_empty() {\n            anyhow::bail!(\"dest_path cannot be empty\");\n        }\n\n        let p = Path::new(trimmed);\n        if p.is_absolute() {\n            anyhow::bail!(\"dest_path must be relative — got absolute path\");\n        }\n\n        for component in p.components() {\n            match component {\n                Component::Normal(_) => {}\n                Component::CurDir => {}\n                Component::ParentDir => {\n                    anyhow::bail!(\"dest_path may not contain '..'\");\n                }\n                Component::Prefix(_) | Component::RootDir => {\n                    anyhow::bail!(\"dest_path must be relative\");\n                }\n            }","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/network/curl.rs#L37-L73","documentation":"resolve_dest trims the dest_path and found nothing left, so there is no file name to place the download under; the request is refused before any path joining happens.","triggerScenarios":"Thrown at src/openhuman/tools/impl/network/curl.rs:55 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Supply a non-empty relative file name or subpath for dest_path","Check that dest_path is not only whitespace in the tool arguments"],"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"}