P1 fixes: outbox no_handlers, HTML sanitization, WebSocket plugin check, fail-closed plugin gate, plugin admin-only
This commit is contained in:
+8
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user