The panel trust bridge is off unless `PANEL_TRUST_SECRET` has a value, and
the template shipped it blank. The updater appends missing keys from the
template, so an install that predates the bridge ended up with
`PANEL_TRUST_SECRET=` and the console could not sign panel statements.
The Agents page then reported that address-book names were unavailable
because the console could not securely reach the Go address-book service.
`mergeEnvFile` now fills empty auto-generated secrets after merging, and
`buildEnvSubstitutions` resolves the template placeholder so fresh installs
get a real key. A non-empty value is never overwritten, and the key is
listed in PROTECTED_KEYS so a later overwrite cannot happen. Co-located
console and Go need nothing else: loopback is always allowed by
`panelTrustPeerAllowed`. Only split deployments need
`PANEL_TRUST_ALLOWED_HOSTS`, which the template now says explicitly instead
of implying it is required everywhere.
Ships via panel update (Settings -> Updates). Verify: on an install whose
`.env` has a blank `PANEL_TRUST_SECRET`, run an update and confirm the key
has a 64-character value and the Go log shows
`[panel-trust] enabled for panel-originated requests`.
Thanks: INSOLVE (Honorary); betterde.sk (@trybetterdesk, Bronze); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
Stop before a direct copy into a root-owned server binary directory and return the documented root deploy guidance. When an operator completes the validated deploy helper, clear the stale-binary warning only after the source and service binaries match byte-for-byte.
Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
Hardening device registration must not lock out the clients the product is built
for. Stock RustDesk clients and Support Agents cannot produce an Ed25519
signature, so `POST /api/bd/register` now accepts three equivalent proofs of
admission instead of demanding a signature:
1. an `approved` row in `pending_registrations` for this exact device id
(operator clicked Approve in the Registrations tab),
2. a single-use enrollment token issued by `POST /api/bd/enroll`,
3. an Ed25519 proof of possession of the key being bound.
Banned and soft-deleted ids are still refused before any write, and an existing
device's key/uuid can only be rotated by the key it already has — admission
proves identity, not ownership of an established identity. The refusal is a
single neutral error (`403 enrollment_proof_required`) so a caller cannot probe
which admission method is missing.
Verified end to end on the test host: register before approval -> 403
enrollment_proof_required; register-request -> pending; operator approval;
register with no signature -> 200; template + enroll -> 200; register with the
token -> 200; a second device reusing the same token -> 403.
Also fixed, because it silently broke this same model:
- `POST /api/bd/enroll` and the agent-template tab called `db.get()` /
`db.query()`, which the database facade never exposed, so every enrollment
token answered 401. Added `listAgentTemplates` / `getAgentTemplateByToken` /
`createAgentTemplate` to both adapters and `lib/agentTemplates.js`.
- PostgreSQL installs had no `agent_templates` table (it only existed in SQLite
auth.db). It is now created by the adapter schema on both backends with
`enrolled_device_id` / `enrolled_at`, so a token is single-use and bound to one
device.
Tests: `tests/bd-register.enrollment.test.js` (8 cases covering approval,
pending, rejected, token, token reuse, no-admission, later heartbeats and
removed devices) plus the existing hardening suite (11 cases).
Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
The panel could not rename an administrator: PATCH /api/users/:id accepted only
role, password and email, and the edit dialog locked the username field.
`username` is not just a label. It is the primary key of address_books
(username, ab_type) and the lookup key in org_users and
strategy_assignments.target_key. Renaming only the users row would orphan the
address book and silently detach organisation membership and strategy
assignments, so the rename cascades in one transaction:
- Go: db.Database.RenameUser (SQLite + PostgreSQL) updates users, moves
address_books, follows org_users and strategy_assignments.target_key, deletes
a stale lockout on the target name and moves login_attempts. Collisions return
ErrUsernameTaken (409), bad names ErrInvalidUsername (400).
- Go API: PATCH /api/users/{id} accepts username, refuses LDAP/OIDC accounts
(the provider owns the name) and audits user_renamed.
- Console: db.renameUser with the same cascade for the auth.db store, the route
validates the name, surfaces 409/400, records user_renamed and best-effort
syncs to Go.
- UI: the username field is editable for local accounts with a warning that the
address book and group assignments follow and that the user is signed out.
- Account names now accept A-Z a-z 0-9 . _ @ - (3-64 chars) in the panel, the Go
server and the helper text, so names imported from LDAP/OIDC survive a rename.
Tests: betterdesk-server/db/rename_user_test.go (cascade, collision, invalid
name, missing user, format) and web-nodejs/tests/usernameRename.test.js
(cascade order, lockout handling, missing-table tolerance, format).
Refs #498
Reported-by: @Yamada993
Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
Full report and per-finding status in docs/security/AUDIT_2026-11-13.md.
Critical
- POST /api/bd/register now requires an Ed25519 proof of possession for a
first registration and for any public_key/uuid rotation, rejects banned and
soft-deleted ids before writing, and is rate limited per IP. Knowing a device
id is no longer enough to flood inventory, resurrect a removed device or
swap its key.
- Signal RegisterPk with old_id is applied only when the supplied key or the
machine UUID matches the stored peer, so an unauthenticated caller can no
longer move and delete someone else's row. Stock RustDesk change-ID (no pk,
matching UUID) still works.
- The Go server runs as betterdesk from /usr/local/bin/betterdesk-server and
/opt/rustdesk is no longer group-writable at the directory level, so the
console user cannot replace the binary. DSNs and the bootstrap admin password
are gone from systemd units.
High
- /metrics and /api/health/detail require the metrics allowlist or an API key;
public /api/health returns only {status, version}.
- Panel login consults the shared account-lockout tracker (429 + Retry-After);
delegated 2FA fails closed; pending-2FA state is written after session
regeneration; GET /logout no longer destroys the session.
- HTTP->HTTPS redirect no longer trusts the Host header or absolute request
targets.
- Desktop login no longer pre-renders the account list; a rate-limited
/login/lookup returns at most 8 prefix matches.
- Panel section overrides are clamped to the role ceiling, so a per-user policy
cannot grant a permission the role lacks.
- /api/devices/:id/* is covered by one scope guard (tags, rename, change-id,
restore, access-policy).
- applyUpdate verifies an optional Ed25519-signed manifest and can be made
fail-closed with UPDATE_REQUIRE_SIGNED_MANIFEST=true.
- The privileged broker no longer manages DATABASE_URL, SESSION_SECRET,
DEFAULT_ADMIN_PASSWORD, UPDATE_GITHUB_TOKEN, API_KEY_PATH,
ORG_PEER_VAULT_KEY, SMTP_PASS or API_TOKEN_EXPIRY_DAYS, and reports a
protocol version so a stale broker is detectable.
- Peer status/online/metrics/linked/policy endpoints require device.view and
enforce organisation scope.
Medium / low
- Backup restore enforces a decompressed-size and entry-count budget.
- limit/offset clamped on the console and in the Go audit handlers; public
audit writes are rate limited.
- Data embedded in inline <script> blocks goes through safeJsonScript; the
pairing page escapes the suggested host.
- Go toolchain and builder images bumped to go1.26.11 (GO-2026-6859); the
console requires at least that version to rebuild the server.
- Workflow Actions pinned to commit SHAs; Dependabot tracks github-actions.
- Restart tokens compared with crypto.timingSafeEqual.
Tooling
- scripts/security/pentest-local.sh / .ps1 local security gate.
- scripts/check-security-regressions.sh CI gate (unit credentials, inline
script escaping), wired into Secret Scan.
- Two long-standing red tests fixed (platform loopback address, missing
panelAccessPolicyService mock).
Verified on the test host: /metrics 401, /api/health/detail 401,
/api/peers/online 401, desktop login ships an empty user list, unproven
register returns 403, Host spoofing redirects to the configured public host,
and the broker reports version 2 with a secret-free manifest.
Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
Two defects behind one report.
Navigation: "Pair agent" (and the agents page button) opened the Dashboard
behind a dialog, so asking to pair showed the whole overview, and the
dialog sat over a page it does not belong to. /?activateAgent=1 now
redirects to /pairing, the page that mints the code, and the sidebar has a
single pairing entry pointing there. The separate "Pairing" entry in the
clients group is gone, and so is the activate-agent nav key, which existed
only to mark the dashboard as active.
Blocking: the dialog was opened with an inline display: flex while the beta
sheet had already set .modal-overlay to display: none with opacity 0 for the
closed state. An inline display wins, so the overlay became a visible layer
that the sheet still painted transparent - every click landed on it and the
panel looked frozen. Both dashboard dialogs (pairing code and QR scanner) are
now toggled with the same class the rest of the console uses; no inline
display is left in dashboard.js.
Tests: the pairing UI suite now asserts the redirect, the class-based
toggle, and that no surface links to the old deep link. Its harness also
gained the locals the shell sidebar needs, which is why it failed on the
baseline before.
Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
Stage P3 (definition half) of the strangler plan. The console kept its own
panel section list and role map while Go owned the permissions - the
"second copy" discussion #496 pointed at.
GET /api/panel/catalog now serves the section list (key, label, group,
read/write permission), the group list, the whole permission vocabulary and
the built-in role defaults. Every signed-in principal may read it, because
every role renders its own navigation from it.
The console loads it at startup and looks sections up through
panelCatalog(); the bundled copy stays only as the fallback for an older
server binary and for unit tests. tests/panelCatalogParity.test.js fails if
the two definitions drift apart - it already caught a duplicate "toolkit"
entry nobody had noticed.
Also documents the whole plan in docs/important/console-backend-strangler.md
(domain/table ownership, stages, rollback switches) and updates the UX 3.6
wiki page and the changelog.
Refs #496
Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
Global search (Ctrl+K, or "/" when no field has focus) searches pages,
devices and people from one dialog. Pages come from a server-built index
filtered by panel access and RBAC, so it never lists a page the role cannot
open; devices and people load only when the session may read them.
Long sidebar sections keep their daily pages and fold the rest into a
section-level "More" row with a count, remembered per browser. The menu
filter exists in the beta sidebar too, matches inside those rows and opens
them. Width, collapsed groups, "More" rows and scroll position are restored
before the first paint, so the menu never jumps.
The rest of the console keeps its markup and takes the same rhythm: one
content column, ruled sections instead of floating cards, stat numbers in
one ruled row, page tabs as a ruled row, hairline tables. Chat and Remote
stay full-bleed workspaces. Settings search now names another topic when
the typed words match one.
The shell scroll chain is fixed: the beta declared min-height only while
body.app-page clips overflow, so a long list (Devices) could not scroll and
the floating horizontal bar sat at the bottom of the list instead of the
screen. The content column is the single scrollport again, as in UX 3.5.
nav.more / nav.fewer / search.* / settings.ui.search_topic exist in all 26
locales; the icon subset gains more_horiz; tokens.css gains --radius-full.
Based-on: @rathlinus UX redesign (Refs #493, #495)
Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
Adds an alternative console layout modelled on the community redesign by
@rathlinus and rebuilt on the existing EJS/JavaScript/CSS stack -- the
svelte-rewrite branch stays a design reference and is not merged.
What ships:
- lib/uiShell.js resolves the shell once (query, then cookie, then default)
so SSR markup, asset includes and window.BetterDesk.uiShell cannot
disagree. UX 3.5 remains the default and the fallback; unknown values
(including the removed `classic`) are ignored instead of erroring.
- routes/ui-shell.routes.js exposes GET/POST /api/ui-shell (auth + CSRF) and
persists the choice per browser in the bd_ui_shell cookie. No database
migration, no effect on other operators.
- lib/consoleNav.js groups the existing pages into Devices, Support, People,
Activity and Settings. Every entry keeps its route, RBAC permission and
panel-access section, so a role sees exactly the pages it could open
before; the grouping is presentation only.
- views/partials/ux36-sidebar.ejs renders that model with proper
aria-current/aria-expanded state and no duplicate navigation markup.
- public/css/ux36.css layers the new chrome on top of ux35.css without
forking the --ux35-* token contract, so branding, wallpapers, fonts and
light/dark/custom themes keep working in both shells.
- public/js/ux36-shell.js adds the one-open-group default, filter sync and
the Settings switch; ux35-shell.js keeps owning drawer, resize and theme.
- Settings -> General gains a "Console interface" card so operators can opt
in and out without a URL; ?ui=ux36 works as a support deep link.
- Settings deep links now accept ?tab=<topic> in addition to #topic.
- New nav.* and ux36.* keys in all 26 locales (real translations).
- Docs: CHANGELOG, UX wiki page, Web-Console wiki page, README, contributor
attributions, and .cursor/rules/ux36-attribution.mdc so future UX 3.6
commits keep the credit.
Tests: tests/ux36-shell.test.js, tests/ux36-pages.render.test.js and
tests/ux36-ui-shell.routes.test.js; ux35-ui-contract.test.js updated to
assert both shells. Full web-nodejs suite: 986 passed; the three failing
suites (users.routes, devices.routes, dashboardPairingUi) fail identically
on the untouched branch.
Refs #493
Refs #495
Reported-by: @rathlinus
Based-on: @rathlinus UX redesign (Refs #493, #495)
Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
Give users and groups none/read/write section access and client feature toggles, rebuild the users page matrix UI, and harden settings restart completion.
applyUpdate() writes the root VERSION file only AFTER buildGoServer() runs, so
at build time the root VERSION still held the previous release. That value went
into `-X main.Version=`, producing a freshly compiled server that reported the
old version on /api/health while the panel showed the new one (e.g. panel
3.5.218, server 3.5.214).
betterdesk-server/internal/productversion/VERSION is the file `//go:embed`
actually ships in the binary, and ensureServerSource() already refreshes it as
part of the 287-file server tree sync that happens before the build. Read it
first via readEmbeddedServerVersion(), falling back to the previous logic when
absent or malformed.
Covers the ordering bug with tests that pin the stale-root-VERSION scenario.
Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
Add SESSION_MAX_PER_USER to control how many concurrent panel sessions an
account may hold. A new login ends only the least recently active sessions
beyond the limit.
- 1 (default): unchanged single-session behaviour
- N: keep the N most recently active sessions
- 0: unlimited
The Docker compose files now pass SESSION_IDLE_TIMEOUT, SESSION_MAX_AGE,
SESSION_IDLE_WARN_MS and SESSION_MAX_PER_USER through to the container;
previously the session policy could not be changed in Docker deployments.
The security-audit hardening checklist reports the configured limit.
Store OIDC discovery retry interval atomically and Close() background
goroutines so TestDiscoveryRetryAfterFailure is race-free. Bump toolchain
to go1.26.9 and golang.org/x/text to v0.41.0 (govulncheck clean). Confine
multer unlink paths; harden guest session ID entropy; stop interpolating
device IDs into console format strings; expand CodeQL query filters for
validated/admin-only paths.
Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
Add allowlisted configuration management, permission diagnostics, safe service control, and repair workflows across native and Docker installers. Integrate panel capability checks with broker-backed writes and rollback, and document/test the lifecycle contract.
Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
Prefer console-local VERSION/package.json for ldflags so a stale root-owned
/opt/VERSION cannot pin rebuilt binaries to an old semver. Fall back binary
backups to a writable data dir when /opt/rustdesk denies bak writes (EACCES).
Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
After the Support Generator migration, older pages stayed reachable at /d/:slug but vanished from the list, so the name stayed reserved. List leftover bundles (including when the ALPHA module is not installed) with revoke/delete only.
Refs #412
Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
Prefer verified GitHub Actions or exact Release binaries during native updates, with checksum validation and local compilation fallback. Defer Support Agent source synchronization and rebuild queueing until after the console restart.
Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
Store unattended presets AES-256-GCM in org_peer_credentials (main DB),
admin Set/Clear in Organizations Address Book, runtime inject into
GET /api/ab and Web Remote connect-password auto-fill. Secrets never
persist in shared AB JSON.
Refs #367
Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
- Updated session control mechanisms to ensure proper handling of remote input and clipboard operations.
- Introduced session authorization checks to validate operator permissions before starting desktop sessions.
- Improved input injection logic to prevent unauthorized access during active sessions.
- Added new capabilities for managing session flags and controls, ensuring a more robust and secure desktop experience.
- Enhanced error handling and logging for better traceability of session-related actions.
- Introduced a new step in the CI workflow to check browser JavaScript syntax using the `npm run check:frontend` command.
- Updated package version to 3.5.14 and bumped dependencies: nodemailer to 9.0.4 and ws to 8.21.2.
- Enhanced logging configuration to use NODE_ENV for determining log level.
- Improved accessibility styles for UX 3.5 and added focus outlines for help panel elements.
Panel Redirect URLs on :5000/:5443 used to 404, so auth-query never completed. Proxy the callback to Go, validate the path in Settings, and document the fix.
Default C:\BetterDeskConsole installs no longer treat C:\ as the project root, so installer file writes and SHA tracking succeed; NSSM Access Denied on server restart is non-critical.
Node no longer pre-emptively falls back to :5443 when systemd grants bind capability. Repair HTTPS/TLS syncs PORT=80 with HTTPS_PORT=443; installer health checks and post-toggle tests surface fallback-port mismatches.
Commit web-nodejs lockfile with tar override; CI uses npm ci and moderate npm audit.
Add LOG_LEVEL filtering and log redaction in Node console and Go server.
Validate WS tokens on bd-signal; require single-use token for remote-agent relay.
Limit active relay sessions per IP and block open enrollment without TLS.
Help operators reach the panel at https://domain without :5443 via installer prompts, docs, and cleaner HTTP redirects, and align fresh-install self-signed cert permissions with the #219 deploy flow.
- Implemented input validation for `orgId` and `deviceId` in CDAP and organization detail routes using `assertSafeApiId`, returning a 400 error for invalid inputs.
- Added HTML escaping for `deviceId` and `orgId` in views to prevent XSS vulnerabilities.
- Hardened `patch-role-scope-i18n.js` against prototype pollution with a guard for unsafe nested keys.
- Updated CodeQL configuration to include new exclusions and ensure documented exclusions are applied.
Implement keyboard mode options (Legacy, Map, Auto) and a reset keyboard feature in the remote viewer. Update UI to include buttons for selecting keyboard mode and resetting the keyboard state, enhancing user control over remote input settings. Update localization files for new strings across multiple languages.
Replace invalid prototype getter syntax in local-files.js and mesh-files.js
so the file transfer modal loads in browsers. Panel updates patch
betterdesk-server.service via a passwordless-sudo helper instead of
interactive sudo tee.
Refs #217
Unify .env and systemd updates on protocol toggle, probe the correct panel
port (5443 vs 5000), and match Client API TLS in post-config tests. Use 307
redirect and skip HSTS for self-signed installs so browsers can return to HTTP.
- Added session management features to synchronize media capture and input handling across active tabs.
- Updated audio handling to respect session activity and mute states.
- Improved clipboard functionality to only allow copying to local clipboard from the active session.
- Refactored input capture logic to ensure it only activates for the active viewer tab.
- Introduced a new `syncSessionMediaCapture` function to manage media input across sessions.
- Introduced email notifications for help requests, allowing operators assigned to device folders or groups to receive alerts.
- Moved SMTP configuration to **Settings → Email**, including options for host, credentials, and alert email.
- Updated console layout for better usability and removed legacy SMTP automation tab.
- Added `nodemailer` as a dependency for email handling.
Use plainBodyObject() for device file read API to avoid array .length
tampering; rate-limit ticket DELETE; document intentional sanitizers in
codeql-config.yml for branding, fonts, network monitor, and server paths.
Refs #196
Translate Organizations device-groups UI across all locales, consolidate [Unreleased] notes for 3.3.0, and copy VERSION into native console paths (#192).
Updated CodeQL configuration to exclude additional paths for security checks. Introduced a new file access rate limiter to prevent abuse of file download endpoints. Improved path resolution functions to ensure confined access and added validation in body scalar functions to reject non-scalar types. Enhanced error handling in API endpoint validation to prevent invalid inputs.
- Added functionality to clear stale update results when the local SHA matches the target SHA, preventing unnecessary warnings in the panel.
- Enhanced the update result persistence logic to filter out non-critical failures, ensuring only actionable errors are displayed.
- Updated the update service to handle remote SHA retrieval and integrate with the new result display logic.
- Improved tests for the update result handling to cover new behaviors and ensure reliability.
Centralize path-segment validation in goApiProxy for fleet/commercialization/cross-platform routes while preserving RustDesk peer ID compatibility; sanitize panel JS output and cap audit Recent queries.