{"record":{"id":"8564659ca48df6b0","repo":"BigPizzaV3/CodexPlusPlus","slug":"error-856465","errorCode":null,"errorMessage":"无效的主题市场相对路径","messagePattern":"无效的主题市场相对路径","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/dream_skin_market.rs","lineNumber":350,"sourceCode":"\nfn market_asset_url(base_url: &str, relative: &str) -> anyhow::Result<String> {\n    validate_market_path(relative)?;\n    let base = reqwest::Url::parse(base_url).context(\"主题市场基础地址无效\")?;\n    let joined = base.join(relative).context(\"主题市场资源地址无效\")?;\n    if joined.scheme() != base.scheme() || joined.host_str() != base.host_str() {\n        bail!(\"主题市场资源地址越界\");\n    }\n    Ok(joined.to_string())\n}\n\nfn validate_market_path(value: &str) -> anyhow::Result<()> {\n    if value.is_empty()\n        || value.len() > 256\n        || value.starts_with('/')\n        || value.contains('\\\\')\n        || value.contains(['?', '#', '\\0'])\n    {\n        bail!(\"无效的主题市场相对路径\");\n    }\n    for segment in value.split('/') {\n        if segment.is_empty()\n            || matches!(segment, \".\" | \"..\")\n            || !segment\n                .bytes()\n                .all(|byte| byte.is_ascii_alphanumeric() || matches!(byte, b'-' | b'_' | b'.'))\n        {\n            bail!(\"无效的主题市场相对路径\");\n        }\n    }\n    Ok(())\n}\n\nfn valid_theme_id(value: &str) -> bool {\n    let bytes = value.as_bytes();\n    (1..=64).contains(&bytes.len())\n        && bytes[0].is_ascii_alphanumeric()","sourceCodeStart":332,"sourceCodeEnd":368,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/dream_skin_market.rs#L332-L368","documentation":"Validation guard in validate_market_path: the relative asset path is empty, longer than 256 bytes, starts with '/', contains a backslash, or otherwise violates the relative-path rules (e.g. contains '..' segments). Paths become URLs and file names, so malformed ones are rejected early.","triggerScenarios":"Thrown at crates/codex-plus-core/src/dream_skin_market.rs:350 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a simple relative path (no leading slash, no backslashes, no '..')","Shorten the path to <=256 bytes","Fix the offending manifest field"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f2074595a281bc057525c748175c8eb9805b0673","analyzedAt":"2026-08-23T12:52:24.489Z","contentChangedAt":"2026-08-23T12:52:24.489Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}