HelloZeroNet/ZeroNet · error · VerifyError
File not in content.json
Error message
File not in content.json
What it means
VerifyError raised in verifyFile when getFileInfo(inner_path) returns None, i.e. the file being verified is not listed in the site's content.json. The input at fault is an inner_path with no manifest entry, so there is no hash/size to verify against and the file cannot be trusted.
Source
Thrown at src/Content/ContentManager.py:1023
self.log.warning("%s: verify sign error: %s" % (inner_path, Debug.formatException(err)))
raise err
else: # Check using sha512 hash
file_info = self.getFileInfo(inner_path)
if file_info:
if CryptHash.sha512sum(file) != file_info.get("sha512", ""):
raise VerifyError("Invalid hash")
if file_info.get("size", 0) != file.tell():
raise VerifyError(
"File size does not match %s <> %s" %
(inner_path, file.tell(), file_info.get("size", 0))
)
return True
else: # File not in content.json
raise VerifyError("File not in content.json")
def optionalDelete(self, inner_path):
self.site.storage.delete(inner_path)
def optionalDownloaded(self, inner_path, hash_id, size=None, own=False):
if size is None:
size = self.site.storage.getSize(inner_path)
done = self.hashfield.appendHashId(hash_id)
self.site.settings["optional_downloaded"] += size
return done
def optionalRemoved(self, inner_path, hash_id, size=None):
if size is None:
size = self.site.storage.getSize(inner_path)
done = self.hashfield.removeHashId(hash_id)
self.site.settings["optional_downloaded"] -= sizeView on GitHub (pinned to 454c0b2e7e)
Solutions
- Check that the inner_path is correct and actually listed in content.json before calling verifyFile
- Add the file to content.json (and re-sign) if it is a legitimate new site file
- Treat unlisted files as untrusted: delete them or refuse to serve them
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/Content/ContentManager.py:1023 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HelloZeroNet/ZeroNet@454c0b2e7e (2026-09-02).
Data as JSON: /api/errors/1677c38eacfade9f.
Report an issue: GitHub.