fix: 15 bug fixes for v3.1.0 dashboard and Track E features

Bug fixes (ordered by priority):
- BUG-14 (P1): Fix ImportError in per-user MCP endpoint
- BUG-8 (P2): Raise clear error when PUBLIC_URL missing for OAuth
- BUG-12 (P3): Validate ENCRYPTION_KEY at startup
- BUG-13 (P4): Handle stale JWT gracefully on site creation
- BUG-11 (P5): Add auth validation to WordPress health checks
- BUG-15 (P6): Fix copy button showing Python repr (dict method shadow)
- BUG-1 (P7): Dynamic version from pyproject.toml instead of hardcoded
- BUG-5 (P8): Fix server mode default (sse → streamable-http)
- BUG-9 (P9): Plugin-specific example tools in endpoint instructions
- BUG-4 (P10): Fix settings page sidebar RBAC (session type mismatch)
- BUG-6 (P11): Show real plugin descriptions instead of 'No description'
- BUG-2 (P12): Remove stale 'phase: X.3' from system info
- BUG-10 (P13): Guard timestamps against None in Recent Activity
- BUG-3 (P14): Guard timestamps against None in audit logs
- BUG-7 (P15): Styled 404 page instead of plain text

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
airano
2026-02-24 03:30:16 +03:30
parent 684c889c27
commit 80377a1a22
11 changed files with 244 additions and 30 deletions

View File

@@ -104,6 +104,12 @@ class UserAuth:
self._registration_records: dict[str, list[float]] = {}
providers = self.available_providers()
if providers and not self._public_url:
logger.warning(
"OAuth providers configured (%s) but PUBLIC_URL is not set. "
"OAuth login will fail until PUBLIC_URL is configured.",
providers,
)
logger.info(
"UserAuth initialized: providers=%s, session_expiry=%dh",
providers,
@@ -139,6 +145,12 @@ class UserAuth:
Raises:
ValueError: If provider is unsupported or not configured.
"""
if not self._public_url:
raise ValueError(
"PUBLIC_URL environment variable must be set for OAuth login to work. "
"Example: PUBLIC_URL=https://mcp.example.com"
)
state = secrets.token_hex(32)
self._pending_states[state] = time.time()
self._cleanup_expired_states()