{"record":{"id":"4f83f0f138658125","repo":"HelloZeroNet/ZeroNet","slug":"this-file-is-archived","errorCode":null,"errorMessage":"This file is archived!","messagePattern":"This file is archived!","errorType":"validation","errorClass":"VerifyError","httpStatus":null,"severity":"error","filePath":"src/Content/ContentManager.py","lineNumber":959,"sourceCode":"                            new_content = json.load(file)\n                    except Exception as err:\n                        raise VerifyError(\"Invalid json file: %s\" % err)\n                if inner_path in self.contents:\n                    old_content = self.contents.get(inner_path, {\"modified\": 0})\n                    # Checks if its newer the ours\n                    if old_content[\"modified\"] == new_content[\"modified\"] and ignore_same:  # Ignore, have the same content.json\n                        return None\n                    elif old_content[\"modified\"] > new_content[\"modified\"]:  # We have newer\n                        raise VerifyError(\n                            \"We have newer (Our: %s, Sent: %s)\" %\n                            (old_content[\"modified\"], new_content[\"modified\"])\n                        )\n                if new_content[\"modified\"] > time.time() + 60 * 60 * 24:  # Content modified in the far future (allow 1 day+)\n                    raise VerifyError(\"Modify timestamp is in the far future!\")\n                if self.isArchived(inner_path, new_content[\"modified\"]):\n                    if inner_path in self.site.bad_files:\n                        del self.site.bad_files[inner_path]\n                    raise VerifyError(\"This file is archived!\")\n                # Check sign\n                sign = new_content.get(\"sign\")\n                signs = new_content.get(\"signs\", {})\n                if \"sign\" in new_content:\n                    del(new_content[\"sign\"])  # The file signed without the sign\n                if \"signs\" in new_content:\n                    del(new_content[\"signs\"])  # The file signed without the signs\n\n                sign_content = json.dumps(new_content, sort_keys=True)  # Dump the json to string to remove whitepsace\n\n                # Fix float representation error on Android\n                modified = new_content[\"modified\"]\n                if config.fix_float_decimals and type(modified) is float and not str(modified).endswith(\".0\"):\n                    modified_fixed = \"{:.6f}\".format(modified).strip(\"0.\")\n                    sign_content = sign_content.replace(\n                        '\"modified\": %s' % repr(modified),\n                        '\"modified\": %s' % modified_fixed\n                    )","sourceCodeStart":941,"sourceCodeEnd":977,"githubUrl":"https://github.com/HelloZeroNet/ZeroNet/blob/454c0b2e7e000fda7000cba49027541fbf327b96/src/Content/ContentManager.py#L941-L977","documentation":"verifyFile raises VerifyError('This file is archived!') when isArchived(inner_path, new_content['modified']) returns True — i.e. the site owner previously published an 'archive' entry for this inner_path with a modified timestamp at or after the incoming content's timestamp. Archived files are permanently frozen: any update with an older-or-equal timestamp is rejected, protecting against re-activation of revoked content (commonly user content/joined certs).","triggerScenarios":"isModified -> verifyFile passes the future-timestamp check, then isArchived finds an entry in the root content.json's 'archives' (or cloned archives) covering this path with modified >= the new content's modified; bad_files entry for the path is deleted before raising.","commonSituations":"A user whose content was archived (banned/revoked) keeps trying to republish the same content.json; a site owner archived a path and peers reject the old revision; replaying an old pre-archive content.json after a rollback attempt.","solutions":["If you are the archived user: you cannot republish this path; obtain a new cert/identity or ask the site owner to remove the archive entry","If you are the site owner and archived by mistake: remove the path from the 'archives' section of the root content.json, re-sign and publish","Ensure you publish a new content with modified timestamp greater than the archive timestamp only if the archive rule allows it (archives typically block all newer content too — owner action is required)"],"exampleFix":"// before (root content.json blocking the path)\n{\"archive\": {\"users/1ABC/content.json\": 1600000000}}\n// after (owner un-archives)\n{\"archive\": {}, ...}  // re-sign and publish","handlingStrategy":"try-catch","validationCode":"import json\nroot = json.load(open('data/<site>/content.json'))\nnew = json.load(open('my_content.json'))\narch = root.get('archive', {})\nblocked = [p for p, ts in arch.items() if p == 'users/<addr>/content.json' and ts >= new.get('modified', 0)]\nif blocked:\n    raise ValueError('path is archived by site owner')","typeGuard":null,"tryCatchPattern":"from Content.ContentManager import VerifyError\ntry:\n    site.content_manager.isModified(inner_path, file)\nexcept VerifyError as e:\n    if str(e) == 'This file is archived!':\n        stop_publishing(inner_path)  # path is permanently frozen by owner\n    else:\n        raise","preventionTips":["Check the root content.json archive section before publishing user content","If your identity was archived, create a new identity/cert instead of retrying","Site owners: only archive paths you never want updated"],"tags":["zeronet","content-verification","archive","revoked-content"],"backgroundTag":"content-archived","analyzedSha":"454c0b2e7e000fda7000cba49027541fbf327b96","analyzedAt":"2026-09-02T19:46:57.278Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}