131 Commits

Author SHA1 Message Date
UNITRONIX 5bc6fb08db fix(security): validate guest WS tokens and require OIDC device binding.
Guest /ws upgrades must pass Go access-link validation; RustDesk OIDC auth-query rejects omitted id/uuid when pending has them; bump tar and golang.org/x/text for audit/govulncheck.
2026-07-24 21:43:27 +02:00
UNITRONIX cbc534f3a5 fix(users): stop username unique INSERT retry loop on Postgres (#301)
Skip mirrorCreate on shared Postgres, block 409→create recursion, COALESCE totp_secret on Go ListUsers, and return username_exists on DB unique violations.
2026-07-23 17:31:24 +02:00
UNITRONIX ce988724c1 fix(console): share one WebSocket upgrade dispatcher (#295)
Collapse 11 per-service upgrade listeners into wsUpgradeRouter so Node no longer emits a false MaxListenersExceededWarning at panel startup.
2026-07-22 18:21:50 +02:00
UNITRONIX 088109612d fix(oidc): resolve IdP authorize URL server-side (#298)
Stop browser-redirecting SSO to internal BETTERDESK_API_URL (localhost).
2026-07-22 17:58:27 +02:00
UNITRONIX 0b82160592 fix(console): persist Public Client Endpoints across Docker recreate (#291)
Store PUBLIC_* on the console-data volume so panel settings survive compose recreate; keep Compose env override and .env mirror for IaC and bare-metal.
2026-07-21 17:32:43 +02:00
UNITRONIX 14fb1d9aec fix(security): patch Dependabot and CodeQL alerts on axios, mesh, OIDC
Bump axios and brace-expansion; add mesh rate limits; harden OIDC redirect and ConnLimiter clamp for static analysis.
2026-07-20 23:52:32 +02:00
UNITRONIX 9d8354188a fix(auth): improve LDAP UX and SQLite password backfill (Refs #260)
Copy panel password hashes into missing Go users on SQLite dual-DB so RustDesk client login matches the console; clarify LDAP sub-tab discoverability and provider-bound hints.
2026-07-20 23:44:58 +02:00
UNITRONIX ffe907e73a fix(web-remote): guest page 500 and cookie hijack (Refs #274)
Safe EJS bootstrap for /remote/guest; panel session wins over stale guest cookie.
2026-07-20 23:29:52 +02:00
UNITRONIX fc1ded710e feat(remote): add Guest Access Links for RdClient allowlist shares (Refs #274)
Temporary opaque links give guests a minimal Web Remote UI for selected devices only, without Console inventory or add-any-ID paths. Also fix mesh_share desktop tunnel auth for unauthenticated guests.
2026-07-18 12:27:46 +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 feb3d19987 chore: update .gitignore and Gitleaks configuration, enhance CI workflows
- Updated .gitignore to include new binary paths and retain .gitkeep.
- Modified Gitleaks configuration to ignore additional directories.
- Adjusted CI workflows to prevent execution on version bump pushes and improved version bump handling in scripts.
- Bumped BetterDesk Console Manager version to 3.3.136 in betterdesk.sh and related scripts.
2026-07-13 17:34:41 +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 5873cadb6c fix(linux): isolate Go API port from shared .env API_PORT (#219)
GO_API_PORT now overrides API_PORT=21121 in Go LoadEnv and systemd so handlers stay on :21114 while the Node Client API proxy keeps :21121. Ships via panel update and Repair HTTPS/TLS.

Refs #219
2026-07-09 20:09:40 +02:00
UNITRONIX 5a51548ebe feat(billing): refactor billing contract management and enhance API
- Updated billing contract structure to support multiple target types (organization, device group, folder, device).
- Refactored API handlers to accommodate new billing contract model, including creation, deletion, and listing functionalities.
- Enhanced database interactions for billing contracts, ensuring backward compatibility with legacy billing_org_contracts.
- Added new billing statistics endpoint to provide insights on active sessions and expiring contracts.
- Improved error handling and validation in billing package management.
2026-07-09 06:39:25 +02:00
UNITRONIX 12fcf21203 Fix Linux HTTP/HTTPS toggle reliability (#219).
Stop repair warnings from corrupting systemd User=, unify HTTPS/TLS repair on update/toggle, and patch Go signal ports during panel updates.
2026-07-07 17:25:58 +02:00
UNITRONIX eb8a0732d5 feat(audit): align with RustDesk 1.4.8 and update language files
- Conducted an audit against upstream RustDesk tag 1.4.8, confirming no breaking changes to the wire format.
- Implemented various fixes including client version string, supported encoding handshake, and multi-session handling.
- Updated language files for Arabic, Czech, Danish, German, English, and Spanish to reflect new UI elements and messages.
- Enhanced clipboard and file transfer functionalities to match upstream behavior.
2026-07-06 21:15:43 +02:00
UNITRONIX e4fb2fd1b0 feat(update): implement automatic retry for GitHub raw file downloads
- Added functionality to retry downloads from GitHub on encountering rate limit and server error status codes (429, 502, 503, 504) with exponential backoff.
- Updated the changelog to reflect the new panel updater feature that enhances locale sync reliability during large updates.
- Included tests for the new retry logic to ensure proper handling of retryable status codes.
2026-07-06 20:22:18 +02:00
UNITRONIX 088cada11e feat(remote): enhance file transfer functionality and UI improvements
- Added a drag-and-drop upload feature in the Web Remote interface, allowing users to easily upload files to the currently open folder on the remote side.
- Implemented file transfer features including zstd compression, overwrite confirmation dialogs, and a context menu for file management.
- Updated various language files to reflect new UI elements and messages related to file transfer operations.
- Enhanced CSS for improved layout and user experience in the file transfer interface.
2026-07-06 20:16:06 +02:00
UNITRONIX 3411994d60 feat(docker): introduce official single container layout and update installation scripts
- Added support for an official all-in-one Docker image (`ghcr.io/unitronix/betterdesk`) as the default installation method.
- Updated installation scripts and documentation to reflect the new single container layout.
- Retained legacy two-container layout option for backward compatibility.
- Adjusted API port from `21114` to `21121` for the new layout.
- Enhanced Docker-related scripts and configuration files to support the new structure.
- Updated various language files to ensure consistency in messaging regarding Docker deployment.
2026-07-06 19:31:22 +02:00
UNITRONIX 4e3f6a86e7 fix: panel ID change case preservation and rename sync (#213)
Stop uppercasing custom IDs in the web console and redirect stale client heartbeats to the panel-assigned successor ID so the Go backend and panel stay in sync after a rename.
2026-07-05 22:25:36 +02:00
UNITRONIX 01ff14d7c1 test(devices): add regression test for org team_id on ACL edit (Refs #230) 2026-07-05 21:37:15 +02:00
UNITRONIX abe215dd98 fix(settings): use Utils.api for SMTP settings to fix HTTP 415 (Fixes #240)
Settings Email save/test/load now send Content-Type application/json required by panel API middleware. Adds regression tests for POST without Content-Type.
2026-07-05 21:30:26 +02:00
UNITRONIX 2b68744dd5 fix: enhance API handling and rate limiting for panel and desktop layout
- Resolved issues with panel tabs redirecting to the dashboard on 401 errors by allowing browser requests without Bearer tokens to fall through to panel handlers.
- Extended the rate limit whitelist for Devices/Users API endpoints to prevent 429 errors during high load.
- Introduced a new rate limiter for desktop layout preference saves, ensuring session-authenticated writes are managed effectively.
- Implemented staggered loading for API requests on the Devices page to optimize performance and reduce rate limit bursts.
- Updated relevant tests to cover new fallthrough behavior and rate limiting logic.
2026-07-05 21:16:50 +02:00
UNITRONIX 95ecc69968 fix: improve dashboard rate limiting and enhance panel poll handling
- Updated dashboard panel poll endpoints to utilize a higher widget quota, preventing 'Too Many Requests' errors during load/refresh.
- Introduced a new function to dynamically retrieve panel poll paths, ensuring efficient rate limiting for specific dashboard requests while preserving the general API budget.
2026-07-05 20:09:28 +02:00
UNITRONIX fe104b0ebf fix: enhance server admin access and error handling
- Updated server admin navigation to allow access to sidebar pages based on `server.config`, removing reliance on legacy roles.
- Improved error handling for forbidden access by rendering the correct 403 error page.
- Adjusted role checks to include `server_admin` in the admin access requirements.
- Cleared stale desktop mode state on load to improve user experience.
2026-07-05 20:03:57 +02:00
UNITRONIX d671c86859 feat: user scope UX, role labels, and device visibility defaults (#227)
Add folder/direct-device/strategy assignment from User Management, clearer Pro vs Remote Operator labeling, optional restricted device scope mode, and Go/Node scope parity.
2026-07-05 19:44:18 +02:00
UNITRONIX c752674139 fix: RustDesk Pro ID change and panel parity (Refs #213)
Accept RustDesk 1.4.7 empty-PK ID changes on the Go signal server, cascade panel DB rows on client/panel renames, and align Node panel with live events, strategies UI, org address book editor, and device-group accessible API payload.
2026-07-05 17:15:48 +02:00
UNITRONIX 0e6d20ba5e fix(rdclient): restore keyboard parity with RustDesk native Map path
Send modifiers and nav keys as Map scancodes (not mixed Legacy controlKey),
restore Auto/Windows hybrid for symbols, and add protobuf regression tests.
2026-07-05 00:53:44 +02:00
UNITRONIX 135342a384 fix(rdclient): align web keyboard encoding with RustDesk native contract
Add keyboard-encoder.js for Legacy chr+modifiers and full Map scancode path so Shift, Caps Lock, and symbol keys work reliably on relay sessions including Hyper-V.
2026-07-05 00:40:00 +02:00
UNITRONIX ab86ee5b47 feat: enhance RDInput class with additional modifier handling and scancode mapping
Added new modifier constants for Alt, Control, Meta, and Shift in the RDInput class. Implemented methods to determine when to use scancode mapping for letter keys and to strip unnecessary modifiers for character inputs. Updated the _sendKey and _sendKeyForCode methods to accommodate these changes. Enhanced tests to verify the correct application of scancode mapping and modifier handling in various scenarios.
2026-07-05 00:33:59 +02:00
UNITRONIX 46db7c0cf6 feat: enhance keyboard input handling with CapsLock and NumLock support
Added support for CapsLock and NumLock modifiers in the RDInput class to synchronize remote key events. Introduced methods to determine letter and numpad key codes, and updated the key handling logic to account for CapsLock state in Legacy mode. Enhanced tests to verify the correct application of these modifiers during key events.
2026-07-05 00:16:21 +02:00
UNITRONIX c3498f8206 refactor: update key release handling in input management
Change the behavior of the _releaseAllKeys method to not release unpressed modifier keys during stop and blur events. This adjustment ensures that only actively pressed keys are released, improving input synchronization. Additionally, update related tests to verify the new behavior.
2026-07-05 00:09:06 +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 425a2ad89a Add deleted device management UX for reserved ID reuse (Refs #213)
Panel shows soft-deleted devices with restore and permanent delete, hard delete works for already-soft-deleted peers, and change-ID conflicts return a clear localized message across all locales.
2026-07-03 19:24:04 +02:00
UNITRONIX 082082779e Fix Linux HTTP/HTTPS toggle stuck state (Fixes #219)
Isolate Go signal on :21116 from panel PORT=5000 in .env, fix LE same-file cp redeploy for console user, add Repair HTTPS/TLS path, and harden post-toggle health checks.
2026-07-03 19:12:49 +02:00
UNITRONIX 515bb1218d Fix inbound clipboard sync from RustDesk to rdclient web.
Decode zstd-compressed clipboard payloads, handle multi_clipboards, and write text/HTML/image formats to the browser clipboard.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-30 20:27:26 +02:00
UNITRONIX d05d881df8 Complete Linux HTTP/HTTPS toggle repair for unreadable LE certs.
Auto-redeploy TLS material on update/repair, unify SSL menu C with protocol toggle T, and retry post-toggle health checks so the console user can always read keys under $RUSTDESK_PATH/ssl/.

Refs #219

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 17:52:25 +02:00
UNITRONIX 885a783b7d Fix org device groups losing organization link on tag edit (Refs #221).
Preserve team_id and note on device group updates unless the client sends them, and re-send team_id from the Devices edit modal for org-linked groups.
2026-06-27 21:52:09 +02:00
UNITRONIX 8579e88be4 Fix split-domain RustDesk client config for dashboard and QR (Fixes #222).
Add PUBLIC_SERVER_ID, PUBLIC_RELAY_SERVER, and PUBLIC_API_URL with Settings UI,
unified endpoint resolution across Dashboard/Keys, and fallbacks via PANEL_PUBLIC_HOST.
2026-06-27 20:45:00 +02:00
UNITRONIX bb2ff08f65 Fix NTP server config not reaching betterdesk-server (Fixes #223).
Wire billing/NTP env from console .env into Go on Linux, Windows, and Docker; add OS NTP fallback and Commercialization settings UI to configure and restart the server.
2026-06-27 20:33:56 +02:00
UNITRONIX 1cea0bcefc feat(web-remote): implement file action handling and metadata transfer
Add support for handling file action confirmations during uploads, including the ability to process send confirmations from peers. Enhance the file transfer protocol by introducing a new method to build and handle file metadata digests prior to upload blocks. Update related tests to ensure proper encoding of file response digests for uploads.
2026-06-27 00:42:54 +02:00
UNITRONIX bb38df406a fix(web-remote): enhance file transfer protocol and handling
Refine the RustDesk file transfer protocol by correcting the FileAction mapping for uploads and downloads, ensuring full remote paths are used. Implement optional zstd block decompression for downloads and improve transfer progress reporting. Update related tests for clarity and accuracy in encoding file transfer requests.
2026-06-27 00:14:55 +02:00
UNITRONIX fecb680d6d fix(linux): self-bootstrap panel update sudoers during deploy
Whitelist linux-ensure-console-user.js in sudoers, invoke it via passwordless
sudo from the update module, refresh sudoers after privileged server deploy,
and align betterdesk.sh repair paths so systemd unit helpers apply without a
manual root step.
2026-06-26 23:53:06 +02:00
UNITRONIX 84a7364c31 fix(web-remote): file transfer protocol and modal UX (Refs #217)
Fix upload full-path encoding, fail-fast FT relay sends, stall timeout,
browser Downloads default, richer transfer queue, and drag-drop overlay.
2026-06-26 23:43:45 +02:00
UNITRONIX d0dd8e951a fix(auth): implement missing exchangeOIDCCode for OIDC SSO login (#225)
The OIDC session callback called a Go API client method that was never
wired up, causing TypeError on every SSO login after IdP redirect.
2026-06-26 06:45:55 +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 241f9ba2b9 fix: Web Remote file transfer via dedicated FILE_TRANSFER relay (#217)
Opens a separate relay session for the file manager, adds a RustDesk-style
transfer modal, and cleans up rdclient toolbar/fullscreen UX.

Refs #217
2026-06-24 19:54:20 +02:00