P1 fixes: outbox no_handlers, HTML sanitization, WebSocket plugin check, fail-closed plugin gate, plugin admin-only

This commit is contained in:
Agent Zero
2026-07-29 12:33:46 +02:00
parent 8539a6402c
commit 8dacb739bd
5 changed files with 42 additions and 14 deletions
+8 -3
View File
@@ -312,8 +312,13 @@ def require_active_plugin(plugin_name: str):
)
except HTTPException:
raise
except Exception:
# If registry not initialized yet, allow request (startup race)
pass
except Exception as exc:
# Fail-closed: if registry check fails, deny access (P1.2 fix)
# Previously this was fail-open (pass) which allowed access on errors
logger.error("Plugin activation check failed for '%s': %s", plugin_name, exc)
raise HTTPException(
status_code=status.HTTP_503_SERVICE_UNAVAILABLE,
detail={"detail": f"Plugin activation check failed", "code": "plugin_check_error"},
)
return _check