{"record":{"id":"90191fd33a2e8872","repo":"HelloZeroNet/ZeroNet","slug":"file-not-allowed-s","errorCode":null,"errorMessage":"File not allowed: %s","messagePattern":"File not allowed: (.+?)","errorType":"validation","errorClass":"VerifyError","httpStatus":null,"severity":"error","filePath":"src/Content/ContentManager.py","lineNumber":915,"sourceCode":"        if not rules:\n            raise VerifyError(\"No rules\")\n\n        # Check include size limit\n        if rules.get(\"max_size\") is not None:  # Include size limit\n            if content_size > rules[\"max_size\"]:\n                raise VerifyError(\"Include too large %sB > %sB\" % (content_size, rules[\"max_size\"]))\n\n        if rules.get(\"max_size_optional\") is not None:  # Include optional files limit\n            if content_size_optional > rules[\"max_size_optional\"]:\n                raise VerifyError(\"Include optional files too large %sB > %sB\" % (\n                    content_size_optional, rules[\"max_size_optional\"])\n                )\n\n        # Filename limit\n        if rules.get(\"files_allowed\"):\n            for file_inner_path in list(content[\"files\"].keys()):\n                if not SafeRe.match(r\"^%s$\" % rules[\"files_allowed\"], file_inner_path):\n                    raise VerifyError(\"File not allowed: %s\" % file_inner_path)\n\n        if rules.get(\"files_allowed_optional\"):\n            for file_inner_path in list(content.get(\"files_optional\", {}).keys()):\n                if not SafeRe.match(r\"^%s$\" % rules[\"files_allowed_optional\"], file_inner_path):\n                    raise VerifyError(\"Optional file not allowed: %s\" % file_inner_path)\n\n        # Check if content includes allowed\n        if rules.get(\"includes_allowed\") is False and content.get(\"includes\"):\n            raise VerifyError(\"Includes not allowed\")\n\n        return True  # All good\n\n    # Verify file validity\n    # Return: None = Same as before, False = Invalid, True = Valid\n    def verifyFile(self, inner_path, file, ignore_same=True):\n        if inner_path.endswith(\"content.json\"):  # content.json: Check using sign\n            from Crypt import CryptBitcoin\n            try:","sourceCodeStart":897,"sourceCodeEnd":933,"githubUrl":"https://github.com/HelloZeroNet/ZeroNet/blob/454c0b2e7e000fda7000cba49027541fbf327b96/src/Content/ContentManager.py#L897-L933","documentation":"VerifyError raised during verifyContentInclude when a file listed in the include's content.json violates the parent's 'files_allowed' filename rules. The input at fault is file_inner_path that does not match the whitelist patterns declared in the signing rules, so the include content cannot be accepted.","triggerScenarios":"Thrown at src/Content/ContentManager.py:915 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove or rename the offending file so its inner path matches the files_allowed patterns","Update the parent site's rules (files_allowed in content.json) and re-sign if the file is legitimately needed","Catch VerifyError in verifyContent and reject the include with a descriptive message"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"454c0b2e7e000fda7000cba49027541fbf327b96","analyzedAt":"2026-09-02T19:46:57.278Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}