Commit Graph

55 Commits

Author SHA1 Message Date
UNITRONIX 71f7bb2dfd feat(console): finish the UX 3.6 port - search, More rows, page rhythm
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)
2026-11-11 15:35:11 +01:00
UNITRONIX 602fa36573 feat(console): add opt-in UX 3.6 beta shell in the current EJS stack
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)
2026-11-10 00:53:29 +01:00
UNITRONIX 34825e6fd1 feat(console): add panel access policies with group inheritance
Give users and groups none/read/write section access and client feature toggles, rebuild the users page matrix UI, and harden settings restart completion.
2026-11-09 00:24:03 +01:00
UNITRONIX 850c0f42a0 fix(update): build the Go server with the version from its own source tree
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)
2026-11-08 15:47:35 +01:00
da3dsoul d2c75b9794 feat(auth): make panel sessions per account configurable
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.
2026-11-07 20:48:18 -05:00
UNITRONIX db07c5c5af feat(auth): enforce idle timeout and single panel session per account
Server-side session policy replaces long-lived idle console logins: sliding
idle timeout, absolute max age, atomic replacement of prior sessions, IP/UA
audit metadata, and consistent expired-login redirects.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
2026-10-19 10:19:56 +02:00
UNITRONIX 44221f721b fix(security): close remaining CodeQL findings before 3.5.5
Confine multer unlink to reconstructed safe paths, rate-limit public
agent downloads, allowlist GitHub fetch hosts and local builder tools.
Expand CodeQL query filters for validated false positives.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
2026-10-17 16:32:23 +02:00
UNITRONIX a4061a6e52 fix(security): clear OIDC race, Go CVEs, and CodeQL noise before 3.5.5
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)
2026-10-17 16:21:39 +02:00
UNITRONIX 235c9c0706 security: implement Phase 0-3 remediation (deps, SQL ident, JWT, CSP, suite)
Bump axios/multer and npm overrides; add safeSqlIdent and multer cleanup;
harden JWT aud/iss/nbf; CSP without unsafe-eval via static protobuf build
and data-bd-call delegation; ship Security Test Suite v1.2.0 and docs.
Ignore generated RdClient protobuf artifacts (~40k lines) — rebuild locally
with npm run protocols:rdclient.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
2026-10-17 15:33:48 +02:00
UNITRONIX 6af0c5a65a feat(remote): add gated RDP/VNC dependency updates
Pin the upstream gateway source, verify checksums and licenses in CI, and prepare reviewed dependency update PRs. Keep runtime activation fail-closed while the VNC GPL dependency remains outside the project policy.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-10-04 00:56:07 +02:00
UNITRONIX 36da8a112d fix(update): preserve explicit config file extensions
Prevent the console repair scan from turning JSON requires into .json.js download paths.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-09-19 11:04:49 +02:00
UNITRONIX 78edc5eaf4 feat: add BetterDesk management capabilities
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)
2026-09-18 20:45:57 +02:00
Knienartowicz be17b3077e fix(updates): harden Go binary rebuild version and backup path
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)
2026-09-18 10:18:35 +02:00
UNITRONIX 321dbc1dfe feat: support FPS modes in web sessions 2026-09-12 18:50:06 +02:00
UNITRONIX 28aed5efbf fix(generator): show leftover download pages so they can be deleted
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)
2026-09-11 12:24:24 +02:00
UNITRONIX 01aebf597c Replace CDAP Support Agent generator with BetterDesk Support templates
Install Client generator templates from GitHub, inject custom.txt for incoming-only builds, and remove the Go Support Agent pipeline.
2026-09-07 01:29:41 +02:00
UNITRONIX 2eec0d2ceb feat(update): use commit-bound Go server artifacts
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)
2026-08-23 20:56:45 +02:00
UNITRONIX 34ef01e17d fix(security): harden TLS defaults, device auth, and update privileges
Require stricter client/server TLS options, centralize device auth on agent APIs, constrain Linux privileged update helpers, and harden filebrowser path checks with supporting audit notes.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-08-15 23:28:03 +02:00
UNITRONIX 29d03492fb fix(installer): harden cross-platform lifecycle reliability
Harden native, agent and Docker lifecycle paths with tracked update verification, rollback and preflight checks, safe uninstall semantics, and health verification. Add shared protocol tests, installer CI gates, and lifecycle documentation.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-08-15 21:50:47 +02:00
UNITRONIX 898fcf7b88 feat(org): encrypted peer credential vault for shared address book
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)
2026-08-10 22:18:39 +02:00
UNITRONIX f06fb597e1 fix(console): share SQLite handle and bump better-sqlite3 for Node 24 (#353)
Avoid parallel better-sqlite3 connections that race N-API cleanup hooks after event-bus connect; defer build workers until listen settles.
2026-08-06 01:17:04 +02:00
UNITRONIX ed96e94806 refactor(agent): enhance session management and input handling
- 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.
2026-08-06 00:50:02 +02:00
UNITRONIX 6442b59902 feat(ci): add frontend JavaScript syntax check to CI workflow
- 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.
2026-08-05 23:12:34 +02:00
UNITRONIX 59b3f93d46 fix(oidc): proxy panel callback so RustDesk SSO leaves Waiting (#304)
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.
2026-07-25 08:43:16 +02:00
UNITRONIX db0dfade24 fix(windows): avoid drive-root PROJECT_ROOT breaking panel updates (Refs #272)
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.
2026-07-16 19:38:29 +02:00
UNITRONIX cb559f8594 fix: honour CAP_NET_BIND_SERVICE for native HTTPS on :443 (#219)
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.
2026-07-14 18:00:25 +02:00
UNITRONIX 648a8d4f8a security(3.4): harden console and Go server for pre-release audit
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.
2026-07-12 20:44:46 +02:00
UNITRONIX 14311d4dd6 Improve Linux native HTTPS port 443 UX (#219 follow-up).
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.
2026-07-11 20:50:08 +02:00
UNITRONIX c2aedb10fe Enhance security and input validation across CDAP and organization routes
- 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.
2026-07-09 21:16:55 +02:00
UNITRONIX 34fa96723d feat: add keyboard mode selection and reset functionality
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.
2026-07-04 23:19:14 +02:00
UNITRONIX b787ad9996 fix: rdclient file transfer JS getters and Linux systemd unit updates
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
2026-06-24 20:19:02 +02:00
UNITRONIX 1c0f0b153e fix: Linux HTTP/HTTPS protocol toggle sync and health checks (#219)
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.
2026-06-24 19:16:52 +02:00
UNITRONIX a8f32a845f feat: enhance multi-session viewer functionality
- 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.
2026-06-14 10:09:59 +02:00
UNITRONIX 045dadd0b4 feat: add email notification system and SMTP configuration
- 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.
2026-06-14 09:04:04 +02:00
UNITRONIX 188a13c2c0 fix(security): resolve CodeQL type-confusion and extend query exclusions
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
2026-06-12 06:19:04 +02:00
UNITRONIX bca4740373 Prepare stable 3.3.0 release: i18n, changelog, VERSION deploy.
Translate Organizations device-groups UI across all locales, consolidate [Unreleased] notes for 3.3.0, and copy VERSION into native console paths (#192).
2026-06-12 06:07:22 +02:00
UNITRONIX 5403a04783 chore: update Go server version handling and enhance Docker build process 2026-06-11 20:31:21 +02:00
UNITRONIX aea7b30b29 fix(security): enhance path validation and rate limiting for file access
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.
2026-06-11 18:33:14 +02:00
UNITRONIX c2e0e2e784 fix(security): harden CodeQL findings across console and Go server
Address GitHub code scanning alerts with OIDC SSRF guards, confined path
helpers, safer client routing, branding sanitization, upload rate limits,
and CodeQL config exclusions for dev-only and protocol-intentional hashes.
2026-06-11 06:57:58 +02:00
UNITRONIX 001de87a77 fix: clear stale update results and improve update handling
- 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.
2026-06-10 04:26:18 +02:00
UNITRONIX f346f891bc fix(security): phase-E shared Go API proxy, XSS hardening, audit clamp
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.
2026-06-09 03:22:14 +02:00
UNITRONIX 4c9a1f632e fix(security): phase-D Go API ID guards across all proxy routes
Extend assertSafeApiId to organizations, resource-control, permissions,
tokens, and update paths; harden org UI XSS and attachment confinement.
2026-06-09 03:13:53 +02:00
UNITRONIX 9b02f06465 fix(security): phase-C XSS hardening, path confinement, log redaction
Harden backup restore, theme/attachment paths, frontend escaping, and
sensitive logging without changing normal operator workflows.
2026-06-09 03:00:43 +02:00
UNITRONIX 97492d6005 fix(security): validate Go API paths and file browser entries
Add goApiPath guard on betterdeskApi axios requests, sanitize org/device
IDs in policy routes, and confine server-management directory listings
with resolveChildPath.
2026-06-09 02:46:22 +02:00
UNITRONIX 6d7692ea6a fix(security): phase-A log redaction, font/transfer paths, CI permissions
Stop logging generated admin passwords, redact API login usernames,
confine font and file-transfer temp paths with safePath, and scope
GitHub Actions permissions in build.yml.
2026-06-09 02:42:56 +02:00
UNITRONIX 051b44fa74 fix(update): skip repair download for removed console files
After deleting dev-only i18n scripts from the repo, post-update repair
was still trying to fetch them from GitHub (404). Exclude removed paths
from repair seeds and delete root-level script files on removal.
2026-06-09 02:31:54 +02:00
UNITRONIX 7b938d8c7b fix(security): harden path confinement, SSRF, and shell exec
Add shared safePath helper for file browser, i18n, and backup paths;
use validated OIDC discovery URLs; restrict terminal shells and
network monitor HTTP requests. Remove obsolete one-time i18n migration
scripts already merged into lang/*.json.
2026-06-09 02:21:43 +02:00
UNITRONIX c219f3be68 fix(security): patch CVE-2026-50575 and harden deps, SSRF, shell exec
Complete GHSA-3v82-3gf8-fxx8 WebSocket replay fix for soft-deleted peers,
bump vulnerable Go/Rust dependencies, and apply CodeQL-driven hardening
(OIDC URL validation, path confinement, execFileSync, rate limits).
2026-06-09 02:05:17 +02:00
UNITRONIX 87b0b21b0b fix(update): privileged Go server binary deploy from Linux panel
Hardened installs could not replace betterdesk-server in /opt/rustdesk
from Settings → Updates. Add a validated sudo deploy helper, extend
console update sudoers, and sync privileges before server deploy.

Fixes #183
2026-06-09 01:09:11 +02:00
UNITRONIX 317365c766 Add dev/main branching, automated versioning, and update channel switcher.
Introduce bump-version.js with CI workflows for patch bumps on dev and
stable releases on main, plus panel and installer UI to choose stable vs
development GitHub update branches.
2026-06-07 16:48:31 +02:00