BigPizzaV3/CodexPlusPlus · error
manifest.files 包含无效条目
Error message
manifest.files 包含无效条目
What it means
Thrown by validate_manifest_files when a manifest.files entry fails its structural whitelist: duplicate path, path outside ALLOWED_FILES, a reserved manifest.json/manifest.sig entry declared in files, zero bytes, size above file_limit(path), or a sha256 that is not 64 hex chars. The offending input is the individual manifest.files entry being iterated; this is the inventory sanity pass before content hashing.
Source
Thrown at crates/codex-plus-core/src/dream_skin_package.rs:1108
css_bytes: &[u8],
image_name: &str,
image_bytes: &[u8],
license_bytes: Option<&[u8]>,
) -> anyhow::Result<()> {
let mut seen = HashSet::new();
for file in &manifest.files {
if !seen.insert(file.path.as_str())
|| !ALLOWED_FILES.contains(&file.path.as_str())
|| matches!(file.path.as_str(), "manifest.json" | "manifest.sig")
|| file.bytes == 0
|| file.bytes > file_limit(&file.path)
|| file.sha256.len() != 64
|| !file
.sha256
.bytes()
.all(|b| b.is_ascii_digit() || (b'a'..=b'f').contains(&b))
{
bail!("manifest.files 包含无效条目");
}
let bytes = match file.path.as_str() {
"manifest.json" => manifest_bytes,
"theme.json" => theme_bytes,
"theme.css" => css_bytes,
path if path == image_name => image_bytes,
"LICENSE.txt" => license_bytes.context("manifest 声明了 LICENSE.txt 但包内缺失")?,
"manifest.sig" => continue,
_ => continue,
};
let expected_media_type = match file.path.as_str() {
"theme.json" => "application/json",
"theme.css" => "text/css",
"background.webp" => "image/webp",
"background.jpg" => "image/jpeg",
"background.png" => "image/png",
"LICENSE.txt" => "text/plain",
_ => "",View on GitHub (pinned to f2074595a2)
Solutions
- 删除重复或非法路径条目
- 把 bytes 改为真实文件大小
- 用小写 64 位十六进制 SHA-256 重新计算
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/codex-plus-core/src/dream_skin_package.rs:1108 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/98698a2f4537230b.
Report an issue: GitHub.