BigPizzaV3/CodexPlusPlus · error

Dream Skin 主题包超过 32 MiB 限制

Error message

Dream Skin 主题包超过 32 MiB 限制

What it means

Size guard in validate_and_read_package: the uploaded ZIP is empty or larger than PACKAGE_LIMIT (32 MiB). The check runs before parsing, so an oversized or zero-byte upload never reaches archive processing.

Source

Thrown at crates/codex-plus-core/src/dream_skin_package.rs:92

}

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ValidatedDreamSkinPackage {
    pub manifest: DreamSkinPackageManifest,
    pub theme: Value,
    pub image_name: String,
    pub image_bytes: Vec<u8>,
    pub css: String,
    pub manifest_bytes: Vec<u8>,
    pub license_bytes: Option<Vec<u8>>,
}

pub fn validate_and_read_package(
    bytes: &[u8],
    platform: &str,
) -> anyhow::Result<ValidatedDreamSkinPackage> {
    if bytes.is_empty() || bytes.len() > PACKAGE_LIMIT {
        bail!("Dream Skin 主题包超过 32 MiB 限制");
    }
    let mut archive =
        ZipArchive::new(Cursor::new(bytes)).context("Dream Skin 主题包不是有效 ZIP")?;
    if archive.len() == 0 || archive.len() > FILE_LIMIT {
        bail!("Dream Skin 主题包文件数量必须在 1 到 32 之间");
    }

    let mut entries = Vec::new();
    let mut unpacked = 0usize;
    for index in 0..archive.len() {
        let file = archive
            .by_index(index)
            .context("读取 Dream Skin ZIP 条目失败")?;
        let name = file.name().to_string();
        validate_archive_entry_name(&name)?;
        if file.encrypted() || file.is_symlink() {
            bail!("主题包包含加密内容或链接:{name}");
        }

View on GitHub (pinned to f2074595a2)

Solutions

  1. Rebuild the theme package under 32 MiB (compress or shrink the background image)
  2. Ensure the package file is non-empty and fully uploaded
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/codex-plus-core/src/dream_skin_package.rs:92 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23). Data as JSON: /api/errors/7c69b1ef7607da60. Report an issue: GitHub.