{"record":{"id":"912cdc61993008e9","repo":"BigPizzaV3/CodexPlusPlus","slug":"error-912cdc","errorCode":null,"errorMessage":"市场主题 {} 的来源地址协议无效","messagePattern":"市场主题 (.+?) 的来源地址协议无效","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/dream_skin_market.rs","lineNumber":230,"sourceCode":"    ] {\n        if value.trim().is_empty() || value.len() > limit {\n            bail!(\"市场主题 {} 的{}无效\", theme.id, label);\n        }\n    }\n    if theme.description.len() > 500 || theme.tags.len() > 12 {\n        bail!(\"市场主题 {} 的描述或标签数量超过限制\", theme.id);\n    }\n    if theme\n        .tags\n        .iter()\n        .any(|tag| tag.trim().is_empty() || tag.len() > 32)\n    {\n        bail!(\"市场主题 {} 包含无效标签\", theme.id);\n    }\n    let source = reqwest::Url::parse(&theme.source_url)\n        .with_context(|| format!(\"市场主题 {} 的来源地址无效\", theme.id))?;\n    if !matches!(source.scheme(), \"http\" | \"https\") {\n        bail!(\"市场主题 {} 的来源地址协议无效\", theme.id);\n    }\n    for path in [&theme.theme, &theme.image, &theme.preview] {\n        validate_market_path(path)?;\n    }\n    validate_sha256(&theme.theme_sha256)?;\n    validate_sha256(&theme.image_sha256)?;\n    Ok(())\n}\n\nfn market_http_client() -> anyhow::Result<reqwest::Client> {\n    Ok(reqwest::Client::builder()\n        .user_agent(format!(\n            \"CodexPlusPlus-Themes/{}\",\n            env!(\"CARGO_PKG_VERSION\")\n        ))\n        .connect_timeout(Duration::from_secs(8))\n        .timeout(Duration::from_secs(30))\n        .build()?)","sourceCodeStart":212,"sourceCodeEnd":248,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/dream_skin_market.rs#L212-L248","documentation":"Security guard in validate_market_theme: theme.source_url parses as a URL but its scheme is not http or https. Non-web schemes (file:, ftp:, javascript:, etc.) are refused to prevent the client from being pointed at local or executable resources.","triggerScenarios":"Thrown at crates/codex-plus-core/src/dream_skin_market.rs:230 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Change source_url to an http(s) URL","Remove or fix the theme entry in the manifest"],"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"}