mirror of
https://github.com/UNITRONIX/BetterDesk.git
synced 2026-09-10 09:35:39 +00:00
bbf839754e
Add multiple security hardenings across the server and web console: enforce proof-of-possession for /ws/bd-mgmt using Ed25519-signed headers with timestamp/nonce and replay protection (public key binding, canonicalization, storage, verification, and tests); remove legacy API key query param and config-table fallback in favor of scoped api_keys (migrate bootstrap key into api_keys); tighten WebSocket origin handling for relay and signal servers to allow only localhost origins by default unless an explicit allowlist is set; update auth middleware public paths and test helpers to use X-API-Key header; add ensureScopedAPIKey migration and related helpers; add a GitHub Secret Scan workflow and an audit report. Misc: propagate audit logging on bd-mgmt connect/disconnect and validate enrollment public keys during device register.
88 lines
3.1 KiB
HTML
88 lines
3.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="<%= lang || 'en' %>">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>500 - Server Error | <%= appName %></title>
|
|
<link rel="icon" type="image/svg+xml" href="/branding/favicon.svg">
|
|
<link rel="stylesheet" href="/css/main.css?v=<%= typeof cacheVersion !== 'undefined' ? cacheVersion : '' %>">
|
|
<link rel="stylesheet" href="/css/theme.css?v=<%= typeof cacheVersion !== 'undefined' ? cacheVersion : '' %>">
|
|
<style>
|
|
.error-page {
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
text-align: center;
|
|
padding: var(--space-lg);
|
|
}
|
|
.error-container {
|
|
max-width: 400px;
|
|
}
|
|
.error-code {
|
|
font-size: 120px;
|
|
font-weight: 700;
|
|
color: var(--accent-red);
|
|
line-height: 1;
|
|
margin-bottom: var(--space-md);
|
|
}
|
|
.error-title {
|
|
font-size: var(--font-size-2xl);
|
|
font-weight: 600;
|
|
margin-bottom: var(--space-sm);
|
|
}
|
|
.error-message {
|
|
color: var(--text-secondary);
|
|
margin-bottom: var(--space-xl);
|
|
}
|
|
.error-icon {
|
|
font-size: 64px;
|
|
color: var(--text-tertiary);
|
|
margin-bottom: var(--space-md);
|
|
}
|
|
.error-details {
|
|
background: var(--bg-tertiary);
|
|
border: 1px solid var(--border-primary);
|
|
border-radius: var(--radius-md);
|
|
padding: var(--space-md);
|
|
margin-bottom: var(--space-lg);
|
|
text-align: left;
|
|
font-family: var(--font-mono);
|
|
font-size: var(--font-size-sm);
|
|
color: var(--accent-red);
|
|
overflow-x: auto;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="error-page">
|
|
<div class="error-container">
|
|
<span class="material-icons error-icon">error</span>
|
|
<div class="error-code">500</div>
|
|
<h1 class="error-title"><%= _('errors.server_error_title') %></h1>
|
|
<p class="error-message"><%= _('errors.server_error_message') %></p>
|
|
|
|
<% if (typeof error !== 'undefined' && error && process.env.NODE_ENV === 'development') { %>
|
|
<div class="error-details">
|
|
<pre><%= error.message || error %></pre>
|
|
</div>
|
|
<% } %>
|
|
|
|
<div class="flex gap-sm justify-center">
|
|
<button id="btn-retry" class="btn btn-secondary">
|
|
<span class="material-icons">refresh</span>
|
|
<%= _('errors.try_again') %>
|
|
</button>
|
|
<a href="/" class="btn btn-primary">
|
|
<span class="material-icons">home</span>
|
|
<%= _('errors.go_home') %>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script nonce="<%= typeof cspNonce !== 'undefined' ? cspNonce : '' %>">
|
|
document.getElementById('btn-retry').addEventListener('click', function() { location.reload(); });
|
|
</script>
|
|
</body>
|
|
</html>
|