BigPizzaV3/CodexPlusPlus · critical
DreamSkin 主题包 SHA-256 与审核元数据不一致
Error message
DreamSkin 主题包 SHA-256 与审核元数据不一致
What it means
install_community_theme hashes the downloaded ZIP with SHA-256 and compares it to metadata.package_sha256 recorded during review. Any difference — case-insensitively — aborts the install. This guarantees the package bytes are exactly the reviewed artifact, guarding against tampering, corruption, or server-side substitution even when the size happens to match.
Solutions
- Retry the install to rule out transient corruption.
- Verify the official SHA-256 via the community API metadata and, if possible, an out-of-band source from the theme author.
- Do NOT bypass or trust the download if mismatches persist — the artifact differs from the reviewed one; report it to community operators.
- Try downloading from a different network (rule out local MITM/proxy rewriting responses).
Example fix
// before: ignoring mismatch
install_community_theme(&state_dir, version_id).await?;
// after: catch and surface clearly
match install_community_theme(&state_dir, version_id).await {
Err(e) if e.to_string().contains("SHA-256") => {
eprintln!("theme package failed integrity check; refusing install");
Err(e)
}
other => other,
} Defensive patterns
Strategy: try-catch
Validate before calling
// verify the hash yourself against the review metadata before trusting any theme
let meta: DreamSkinCommunityTheme = fetch_metadata(version_id).await?;
// meta.package_sha256 should be a 64-char hex string; refuse otherwise
if meta.package_sha256.len() != 64 { return Err("missing review checksum".into()); } Try / catch
match install_community_theme(&state_dir, version_id).await {
Err(e) if e.to_string().contains("SHA-256") => {
// never retry blindly more than once; treat persistent mismatch as tampering and stop
}
other => other?,
} Prevention
- Never bypass or work around checksum failures — the package is not the reviewed artifact.
- Retry at most once; a persistent mismatch means server-side substitution or tampering.
- Download from trusted networks to rule out MITM/proxy response rewriting.
- Cross-check package_sha256 with the theme author when possible.
When it happens
Trigger: Calling install_community_theme where sha256(downloaded zip) != metadata.package_sha256 from GET /v1/themes/{version_id} — the package served differs from the reviewed one despite the declared size (or a size match by coincidence after corruption/replacement).
Common situations: MITM or tampered mirror serving a modified package; server-side file replaced without updating review metadata; bit-flip corruption on disk/network; CDN serving a stale or malicious variant of the ZIP.
Understand the failure class
Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.
Related errors
- DreamSkin 主题包实际大小与审核元数据不一致
- DreamSkin 主题版本与请求不一致
- SHA-256 校验失败
- rollout changed before rollback
- API 地址须使用 HTTPS,且不含账号、密码、查询参数或片段
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@b1ed92e5e4 (2026-09-19).
Data as JSON: /api/errors/6707cd648e92af03.
Report an issue: GitHub.
Appendix: source
Thrown at crates/codex-plus-core/src/dream_skin_community.rs:176
}
if !metadata.apply_compatible {
bail!("该主题是旧格式,只支持在线预览或手动下载");
}
let download_url = format!("{COMMUNITY_API_ORIGIN}/v1/themes/{version_id}/download");
let package = download_limited(
&client,
&download_url,
metadata.package_bytes,
"application/zip",
)
.await?;
if package.len() != metadata.package_bytes {
bail!("DreamSkin 主题包实际大小与审核元数据不一致");
}
let actual_sha = format!("{:x}", Sha256::digest(&package));
if !actual_sha.eq_ignore_ascii_case(&metadata.package_sha256) {
bail!("DreamSkin 主题包 SHA-256 与审核元数据不一致");
}
let validated = crate::dream_skin_package::validate_and_read_package(
&package,
if cfg!(windows) { "windows" } else { "macos" },
)?;
if validated.manifest.theme_id != metadata.theme_id
|| validated.manifest.version != metadata.version
{
bail!("DreamSkin 主题包身份与审核元数据不一致");
}
crate::dream_skin_library::save_validated_dream_skin_package(state_dir, &validated)
}
pub fn import_theme_package(
state_dir: &Path,
archive_path: &Path,
) -> anyhow::Result<DreamSkinThemeSummary> {
let metadata = std::fs::symlink_metadata(archive_path)View on GitHub (pinned to b1ed92e5e4)