HelloZeroNet/ZeroNet · error · Exception
Site blocked: %s
Error message
Site blocked: %s
What it means
Guard error raised by the ContentFilter plugin's SiteManagerPlugin.add when the requested site address is present in the user's blocklist (filter_storage.isSiteblocked) and the caller did not bypass the filter with ignore_block or settings kwargs. It enforces the local content-filtering policy rather than reporting a network or data problem.
Source
Thrown at plugins/ContentFilter/ContentFilterPlugin.py:41
global filter_storage
super(SiteManagerPlugin, self).load(*args, **kwargs)
filter_storage = ContentFilterStorage(site_manager=self)
def add(self, address, *args, **kwargs):
should_ignore_block = kwargs.get("ignore_block") or kwargs.get("settings")
if should_ignore_block:
block_details = None
elif filter_storage.isSiteblocked(address):
block_details = filter_storage.getSiteblockDetails(address)
else:
address_hashed = filter_storage.getSiteAddressHashed(address)
if filter_storage.isSiteblocked(address_hashed):
block_details = filter_storage.getSiteblockDetails(address_hashed)
else:
block_details = None
if block_details:
raise Exception("Site blocked: %s" % html.escape(block_details.get("reason", "unknown reason")))
else:
return super(SiteManagerPlugin, self).add(address, *args, **kwargs)
@PluginManager.registerTo("UiWebsocket")
class UiWebsocketPlugin(object):
# Mute
def cbMuteAdd(self, to, auth_address, cert_user_id, reason):
filter_storage.file_content["mutes"][auth_address] = {
"cert_user_id": cert_user_id, "reason": reason, "source": self.site.address, "date_added": time.time()
}
filter_storage.save()
filter_storage.changeDbs(auth_address, "remove")
self.response(to, "ok")
@flag.no_multiuser
def actionMuteAdd(self, to, auth_address, cert_user_id, reason):
if "ADMIN" in self.getPermissions(to):View on GitHub (pinned to 454c0b2e7e)
Solutions
- Catch the exception and show the user a 'site blocked' notice instead of the site content
- If the access is intentionally administrative, re-call add() with ignore_block=True in kwargs
- Ask the user to remove the address from the blocklist in the site's filter settings before retrying
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at plugins/ContentFilter/ContentFilterPlugin.py:41 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/1941ea01ff6889ae.
Report an issue: GitHub.