{"record":{"id":"4363b6e8c594bafd","repo":"BigPizzaV3/CodexPlusPlus","slug":"dreamskin-id","errorCode":null,"errorMessage":"DreamSkin 主题版本 ID 无效","messagePattern":"DreamSkin 主题版本 ID 无效","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/dream_skin_community.rs","lineNumber":289,"sourceCode":"fn validate_community_theme(theme: &DreamSkinCommunityTheme) -> anyhow::Result<()> {\n    validate_version_id(&theme.id)?;\n    if !safe_text(&theme.theme_id, 80)\n        || !safe_text(&theme.name, 120)\n        || !safe_text(&theme.author_display_name, 120)\n        || !safe_text(&theme.license, 80)\n        || !valid_semver(&theme.version)\n        || theme.package_bytes == 0\n        || theme.package_bytes > PACKAGE_BYTES_LIMIT\n        || !valid_sha256(&theme.package_sha256)\n    {\n        bail!(\"DreamSkin 社区主题元数据无效：{}\", theme.id);\n    }\n    Ok(())\n}\n\nfn validate_version_id(value: &str) -> anyhow::Result<()> {\n    let Some(suffix) = value.strip_prefix(\"ver_\") else {\n        bail!(\"DreamSkin 主题版本 ID 无效\");\n    };\n    if !(8..=64).contains(&suffix.len())\n        || !suffix\n            .bytes()\n            .all(|byte| byte.is_ascii_lowercase() || byte.is_ascii_digit())\n    {\n        bail!(\"DreamSkin 主题版本 ID 无效\");\n    }\n    Ok(())\n}\n\nfn safe_text(value: &str, maximum: usize) -> bool {\n    let trimmed = value.trim();\n    value == trimmed\n        && !value.is_empty()\n        && value.chars().count() <= maximum\n        && value.chars().all(|character| {\n            !character.is_control()","sourceCodeStart":271,"sourceCodeEnd":307,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/dream_skin_community.rs#L271-L307","documentation":"Validation in validate_version_id (dream_skin_community): a DreamSkin theme version id string failed the id format check (e.g. from a dreamskin://apply link or a catalog entry's id field), so it cannot be used as a safe directory/file identifier. Fired by normalize/display and link-parsing paths.","triggerScenarios":"Thrown at crates/codex-plus-core/src/dream_skin_community.rs:289 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an apply link or catalog entry with a well-formed version id","Re-copy the dreamskin:// link if it was truncated or edited","Avoid hand-crafting version ids"],"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"}