{"record":{"id":"57cb7507def249ea","repo":"tinyhumansai/openhuman","slug":"dest-path-must-be-relative-got-absolute-path","errorCode":null,"errorMessage":"dest_path must be relative — got absolute path","messagePattern":"dest_path must be relative — got absolute path","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/tools/impl/network/curl.rs","lineNumber":60,"sourceCode":"            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            }\n        }\n\n        let root = self.workspace_dir.join(&self.dest_subdir);\n        let resolved = root.join(p);\n","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/network/curl.rs#L42-L78","documentation":"The supplied dest_path parses as an absolute path (leading '/' or a Windows prefix), which would ignore the download root; resolve_dest rejects it to keep every download inside <workspace>/<dest_subdir>.","triggerScenarios":"Thrown at src/openhuman/tools/impl/network/curl.rs:60 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a path relative to the downloads root, e.g. 'file.zip' or 'sub/file.zip'","Let the tool choose the location and omit dest_path if no specific name is 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-14T05:17:10.506Z"}