Commit Graph

143 Commits

Author SHA1 Message Date
UNITRONIX 577fc79a97 chore: update Docker Compose image tags to 3.2.12 and enhance documentation for versioning 2026-06-11 18:36:48 +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 07e1e8626b fix: clear stale update banner on Windows and Docker paths
Fixes #192 — script and GHCR update flows now drop data/.last_update_result.json
the same way betterdesk.sh already does, so a failed in-panel attempt no longer
sticks around after a successful external update.
2026-06-11 04:48:38 +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 c731c8b8ad fix(security): address CodeQL findings for release PR #185
Harden desktop-mode DOM rendering, branding sanitization, OIDC fetch
guards, API-key log redaction, tag-map allocation, and ws-register-test TLS.
2026-06-09 06:51:50 +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
UNITRONIX a6ec256f57 feat(update): implement last update result reporting in settings
Added a new API endpoint to retrieve the last update result, enhancing the user interface by displaying detailed error messages for failed updates. Improved the update completion modal to reflect the status of services and console restarts, ensuring users are informed of any issues. Updated the settings JavaScript to load and display the last update result dynamically, improving overall user experience during updates.
2026-06-07 15:06:48 +02:00
UNITRONIX c8d7b6afd0 feat(update): enhance error reporting and sudoers management during updates
Improved the update process by adding detailed error reporting for failed updates, including specific file and service errors. Implemented a function to manage passwordless sudoers for console service restarts, ensuring smoother updates on Linux systems. Enhanced npm installation error handling to capture and log detailed failure messages.
2026-06-07 14:57:59 +02:00
UNITRONIX 8ea3ac15ff feat(update): add index module resolution check during console file repair
Introduced a new function, isResolvedByIndexModule, to determine if a local path is resolved by an index module. This enhancement allows the repair process to skip phantom routes when an index.js file exists, improving the accuracy of the console file repair logic. Added corresponding tests to validate this behavior.
2026-06-07 14:45:11 +02:00
UNITRONIX 05fb2916ff fix(update): improve console restart handling and permission checks
Enhanced the update process to better manage console restarts by checking for blocked permissions before attempting a restart. Added logic to handle cases where console service user permissions are not verified, ensuring that appropriate messages are logged and the update phase is accurately reflected. Updated the console restart scheduling to occur after the response is sent, improving overall reliability. Additionally, modified the comment handling in the dependency scanning process to ignore requires within comments.
2026-06-07 14:41:27 +02:00
UNITRONIX 3966e2ab5e fix(update): handle per-file download errors in console sync (#173)
Continue full-tree sync and missing-file repair when individual GitHub
downloads fail, matching ensureServerSource behaviour and reporting each
failure in update results instead of aborting the whole operation.
2026-06-07 13:49:21 +02:00
UNITRONIX 248b4a049f fix(update): sync full console tree when compare diff is truncated (#173)
GitHub compare returns at most 300 changed files, so in-app panel updates could
deploy updated routes without new service modules (e.g. serverAttestation.js).
Add full web-nodejs tree sync on truncated diffs and repair missing local require
targets after incremental console updates.
2026-06-07 13:43:33 +02:00
UNITRONIX 06bf6c503c feat(i18n): add group membership messages in multiple languages
Added new localization strings for group membership actions, including "added to group" and "removed from group," across various language files. This enhancement improves user experience by providing clear feedback on group membership changes in the user's preferred language.
2026-06-07 12:13:29 +02:00
UNITRONIX 09d20c3444 feat(consent): streamline remote consent handling for terminal and desktop sessions
Refactored the consent handling logic for both terminal and desktop sessions to utilize a unified requestRemoteConsent method. This change simplifies the consent process, ensuring consistent behavior across different session types. Additionally, introduced default session ID handling and improved logging for consent status. Updated related payload structures to include operator names for better tracking.
2026-06-07 12:03:49 +02:00
UNITRONIX 1320457e56 feat(build): enhance agent build process and add server library support
Updated the build scripts to include the server library in the agent build process. Introduced new environment variables for Go module and build caches to improve build efficiency. Enhanced the generator route to support multiple languages and added locale labels for better user experience. Updated the generator view to dynamically populate language options based on supported languages.
2026-06-07 10:38:24 +02:00
UNITRONIX f02988fe34 fix(update): resolve project root for flat console installs
On flat Linux deployments, server source sync was writing to /opt/betterdesk-server
instead of the console directory, causing EACCES during rebuild and updates.
2026-06-07 01:09:16 +02:00
UNITRONIX e7e4e359c1 fix(update): set HOME for Go builds when service user home is not writable
Go toolchain downloads and sumdb checks also use $HOME/go even when
GOMODCACHE is set. Point HOME at the console data directory during
server auto-rebuilds.
2026-06-07 00:39:02 +02:00
UNITRONIX 73e3ae19eb fix(update): use writable Go module cache under console data dir
Point GOMODCACHE and GOCACHE at data/go-cache when auto-rebuilding the
server binary. The betterdesk service user often has HOME=/var/lib/betterdesk
which may not be writable, causing "could not create module cache" on update.
2026-06-07 00:35:02 +02:00
UNITRONIX 50d1942f8c fix(auth): show username collision when LDAP matches local account (#148)
Add Go LDAP verify endpoint and probe it from the console when a local
user's password fails, so valid domain credentials return HTTP 409 with a
clear collision message instead of a misleading password mismatch. Includes
i18n for auth.username_collision across all console locales.
2026-06-07 00:32:03 +02:00
UNITRONIX 73d614b338 fix(console): migrate legacy auth.db token_hash on SQLite upgrade (#158)
Existing Docker volumes crashed at startup because ensureAuthTables indexed
token_hash before the column existed on upgraded auth.db files. Bump images to 3.0.0.
2026-06-07 00:26:48 +02:00
UNITRONIX bb3cc09c3f fix(presence): clarify post-migration offline state and emit peer_online events.
After RustDesk→BetterDesk migration, HTTP heartbeats can update last seen while
UDP signal registration is still missing. Show a distinct "No signal" badge,
document the two-channel presence model, and publish peer_online on registration.
2026-06-07 00:13:54 +02:00
UNITRONIX 900de8f36a fix(console): recover web panel after update user switch (#171)
Sync console file ownership before the dedicated service user starts, add
ExecStartPre permission repair on systemd, and skip in-app restart when
permissions are not verified so the panel does not die with Bad Gateway.
2026-06-06 23:33:57 +02:00
UNITRONIX 9c6490f6ab fix(ci,update): unblock Web Console CI and non-root in-app updates.
Use npm install without a lockfile in CI, treat root-owned installer scripts as non-critical update failures, and skip privileged H-7 hooks when betterdesk already exists without sudo.
2026-06-06 14:46:41 +02:00
UNITRONIX 647a3221f9 Harden console security and wire fixes into the update flow.
Hash RustDesk access tokens at rest (phase 1), add SSRF guards for admin network tools with LAN monitoring support, run dedicated console service user on Linux, and hook post-update verification plus service patching into both betterdesk.sh and the in-app updater.
2026-06-06 14:40:51 +02:00
UNITRONIX e067a5a865 fix(update): disable in-app updates for Docker GHCR deployments (#158)
The panel updater assumed a native install with Go source on disk. In
Compose/GHCR mode it now uses the embedded image commit, clears stale
binary markers, and directs operators to pull new container images instead.
2026-06-06 14:09:57 +02:00
UNITRONIX 8261128ccd feat(notifications): implement persistent read state for notifications
- Added a new database table to track read notifications per user, enhancing the notification system's functionality.
- Updated the API routes to utilize the new read state, allowing users to mark notifications as read and retrieve their read status.
- Refactored related functions to improve code clarity and maintainability, ensuring that read states are efficiently managed and persisted.
2026-06-06 09:26:31 +02:00
UNITRONIX 980d8d3081 fix(dbAdapter): restore unique index creation for agent_bundles.slug
- Reintroduced the creation of a unique index on the slug column in the agent_bundles table, ensuring that slugs are unique and not null or empty.
- Added a check to create the slug column if it does not exist, enhancing the database schema integrity during the adapter setup.
2026-06-06 09:24:39 +02:00
UNITRONIX e7215f2f9d feat(i18n): add short link functionality and validation messages across multiple languages
- Introduced new localization strings for short download links and their hints in various languages.
- Added validation messages for short link requirements, including character restrictions and length constraints.
- Updated existing download link hints to inform users that old hex links will continue to function after changes to short links.
- Ensured consistency across all language files to enhance user experience and clarity in the interface.
2026-06-06 09:18:48 +02:00
UNITRONIX 8b916488b9 Complete web console i18n audit and refine server attestation.
Sync all 26 locale files to the EN+PL baseline (3432 keys), add OBSIDIAN tier strings, and ship i18n apply/audit tooling. Improve server attestation UX and convert orphaned node:test scripts to Jest so the full test suite passes.
2026-06-06 02:36:57 +02:00
UNITRONIX 66f594e53f fix(localization): correct server tier descriptions in English and Polish
- Swapped the descriptions for the 'platinum' and 'titanium' tiers in both English and Polish localization files to accurately reflect their connection capacities.
- Updated the tier descriptions to enhance clarity regarding server performance and infrastructure capabilities.
2026-06-06 00:42:10 +02:00
UNITRONIX c3816ece44 feat(server-attestation): add server attestation feature and UI integration
- Introduced server attestation functionality with performance benchmarking capabilities.
- Added new localization strings for server attestation in English and Polish.
- Updated authentication routes to include server attestation data on login.
- Enhanced desktop and standard login views to display attestation badge.
- Integrated server attestation link in the sidebar for easy access.

This feature provides users with insights into server performance and connection capacity.
2026-06-06 00:41:03 +02:00
UNITRONIX bc98140959 fix(auth): block local/SSO username collision (#148)
Do not auto-convert an existing local account if Go authenticates the same
username via LDAP/OIDC. Treat it as a collision and require admin action,
preventing potential privilege confusion when names overlap.
2026-06-05 09:15:43 +02:00
UNITRONIX 3c4f1e2ec7 fix(console): sync auth_provider and LDAP login with Go (#148)
Repair the Node.js panel auth path so LDAP/OIDC users get the correct
provider and role from Go: forward authProvider in the database facade,
export syncUserFromGo, enforce provider-bound login, use unusable hashes
for external accounts, block panel edits of IdP-managed users, and
reconcile provider/role via Go API on PostgreSQL.
2026-06-05 02:24:14 +02:00
UNITRONIX 6988410cac Refactor device enrollment process and enhance help request handling
- Improved logging in the device registration process to capture detailed enrollment information.
- Updated the enrollment token handling to ensure each device registers independently, eliminating the use of shared tokens.
- Introduced new API endpoints for managing help requests, allowing operators to acknowledge and resolve requests through the panel.
- Enhanced the generator routes to support the new help request functionality, improving overall API integration and user experience.
- Refactored the branding process to remove legacy enrollment token references, streamlining the support agent's configuration.
2026-06-05 02:17:35 +02:00
UNITRONIX 8fe678f980 Implement device self-help request and enhance enrollment token handling
- Added a new API endpoint for enrolled devices to raise help requests via REST when not connected to CDAP.
- Improved the device enrollment process by issuing a device token during status polls, allowing for seamless recovery of CDAP authentication.
- Enhanced error handling for device token validation and ensured proper responses for various failure scenarios.
- Updated the build process to support dual UI binaries for Linux (X11 and Wayland) and included a session-aware launcher.
- Refactored the installation script to accommodate the new Linux UI bundle structure, improving deployment flexibility.
2026-06-04 20:06:12 +02:00
UNITRONIX 733c4f62be Refactor system tray icon handling and enhance OpenGL support
- Updated the system tray icon setup to use a platform-appropriate resource method, improving compatibility across operating systems.
- Introduced a new function to provide a tray icon resource based on the platform, ensuring proper icon display on Windows.
- Enhanced the installation process to include copying the Mesa OpenGL library for better GUI support on Windows, particularly in virtual environments.
- Updated the build worker to stage the OpenGL library alongside the application, improving user experience for GUI operations.
- Refactored command-line options to clarify GUI usage and improve overall application behavior in headless environments.
2026-06-04 15:46:00 +02:00
UNITRONIX 6537c994f5 Enhance support agent functionality and improve API integration
- Added a new method to check if the agent has an active CDAP session, improving connection status reporting.
- Updated the SendHelpRequest function to utilize the engine for sending help requests, enhancing the request handling process.
- Refactored health check methods to include the Go management API, replacing the console health checks for better integration.
- Improved branding logo handling by introducing a PNG validation function, ensuring only valid images are used.
- Updated UI elements and localization strings to reflect changes in API endpoints and improve user experience.
2026-06-04 15:39:21 +02:00
UNITRONIX 8bd60d1193 Refactor UI status handling and improve Go toolchain installation checks
- Updated the UI to utilize a new status handling method, enhancing the display of connection and enrollment statuses.
- Introduced a status dot indicator for better visual feedback on connection state.
- Refactored the Go toolchain installation script to verify the presence of the JSON package instead of PNG, improving compatibility checks.
- Enhanced error handling in the agent build worker to streamline the build process and ensure proper environment setup.
2026-06-04 04:12:01 +02:00
UNITRONIX 7406d38e8d Implement client build management features
- Added new UI components and functionality for managing client builds, including a section for displaying build statuses and a button to rebuild all platform installers.
- Enhanced the generator routes to support rebuilding of bundles, including error handling for revoked bundles.
- Updated the agent build worker to facilitate the rebuilding process for platform builds associated with a specific bundle.
- Improved localization by adding relevant strings for build management in English and Polish language files.
- Introduced CSS styles for the new builds section to enhance visual presentation and user experience.
2026-06-04 03:37:01 +02:00
UNITRONIX 216cf4851b Refactor Go toolchain health checks and installation process
- Simplified the health check for the Go binary in agentBuildWorker by utilizing a new method from updateService to verify the standard library.
- Enhanced the installation process of the Go toolchain to handle concurrent requests and added an option to limit the maximum version during installation.
- Improved error handling and cleanup in the goStdlibHealthy function to ensure temporary files are removed after checks.
- Updated the resolveGoRelease function to support version constraints, ensuring compatibility with specified maximum versions.
2026-06-04 03:32:18 +02:00
UNITRONIX f13fa764fd Enhance Go toolchain health checks and error handling
- Updated the agentBuildWorker to return null if no healthy Go binary is found, improving error handling.
- Enhanced the updateService with a new function to verify the integrity of the Go standard library, ensuring a complete installation.
- Implemented additional checks during Go toolchain installation to handle incomplete standard library scenarios, improving reliability and user feedback.
2026-06-04 03:27:43 +02:00