Commit Graph

161 Commits

Author SHA1 Message Date
UNITRONIX f354e83a14 fix(console): surface registration notifications and stabilize relay delivery
Expose pending LAN and managed enrollment requests in the UX 3.5 notification center, synchronize badges through authenticated panel events with polling fallback, and refresh the registrations view automatically. Also include the pending relay transport fixes already present in the working tree.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-08-23 15:27:13 +02:00
UNITRONIX 25618caac1 fix(console): fail closed on missing peer/strategy scope writers
Reject POST/PATCH /api/users before mutating when peer grant or strategy
assignment DB methods are absent; return refreshed scope on PATCH; warn
on unknown peerIds; add facade parity and scope regression tests.

Refs #380

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-08-22 01:17:41 +02:00
UNITRONIX 7fe4478088 fix(console): wire peer grant facade exports for user peerIds
POST/PATCH /api/users accepted peerIds but never wrote user_peer_grants
because get/setUserPeerGrants (and strategy helpers) were missing from
the database.js facade. Refs #380

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-08-20 08:20:20 +02:00
UNITRONIX 9896799d4b fix(ui): warn on unreachable config QR hosts (#368)
Keys QR now uses the same Dashboard client-host override, and both modals warn when the payload embeds localhost/loopback/.local so phones are not misled after the encoding fix.

Refs #368

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-08-17 06:55:04 +02:00
UNITRONIX 517e85a4a4 fix(agent): repair Support Agent generator Linux and Windows builds
Generate Windows ICO from plaintext branding before sealbranding, and pack Linux Wails as a single binary (Fyne dual layout when present).

Refs #373

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-08-15 23:48:11 +02:00
UNITRONIX f64fbbb354 fix(security): finish privileged update path and relay auth tests
Wire the allowlisted privileged-update helper into panel/update scripts, tighten chat/remote relay checks, and add deviceAuth/update helper coverage.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-08-15 23:29:01 +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 88d84e8c65 fix(keys): encode RustDesk config QR as reversed deploy string
Match rustdesk://config/ path to Copy deploy string so ServerConfig.decode accepts the QR (#368). Also align MFA otpauth URI with Go (issuer BetterDesk, 20-byte secret) and document Android 1.4.9 deep-link fallback in UI hints.

Refs #368

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-08-14 06:52:41 +02:00
UNITRONIX ad15f50cf4 fix(enrollment): global pending badge and legacy reject IP (#351)
Combine LAN + managed enrollment in /api/registrations/count so the sidebar badge works on all pages. Backfill orphan rejected_device_* IP from peers when available.

Refs #351

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-08-10 22:36:11 +02:00
UNITRONIX c9f7ae5006 fix(agent): hide console windows for PowerShell commands and improve GDI screenshot capture
- Updated PowerShell command invocations to use `-WindowStyle Hidden` to prevent visible console windows during clipboard operations and other commands.
- Implemented GDI-based screenshot capture to eliminate the need for PowerShell, reducing console window spamming during desktop capture.
- Enhanced error handling for missing OpenGL DLLs and ensured complete Mesa DLL set is shipped with the agent to prevent startup issues.
- Updated build scripts to ensure proper installation of required tools and dependencies for Windows builds.
2026-08-09 20:44:12 +02:00
UNITRONIX 6274790bba fix(rdclient): recover Cliprdr stack and stop 0KB remote files (Refs #350)
Bring native Cliprdr/desktop file IPC from divergent orphan history onto current
dev, including base64 coerce and FILEGROUPDESCRIPTOR flags matching RustDesk.
2026-08-06 22:05:58 +02:00
UNITRONIX 1bc16efe8f fix(agent): enhance Support Agent profile handling and branding backup
- Implemented logic to reissue incomplete or expired signed Support Agent profiles during rebuilds, preventing operators from getting stuck in retry loops.
- Updated `build.sh` to handle the absence of `branding.pub` more gracefully, ensuring it doesn't fail on fresh workspaces.
- Refactored branding functions to utilize a dedicated support profile service, improving code organization and maintainability.
- Added tests to verify the correct behavior of version injection and support profile validity checks.
2026-08-06 21:08:42 +02:00
UNITRONIX 8730d9b083 feat(agent): allow HTTP/WS Support Agent profiles and fix enrollment proof reuse
LAN/IP bundles can use plaintext HTTP/WS like RustDesk while session crypto stays on the protocol layer; enrollment no longer treats a second same-request proof check as a nonce replay.
2026-08-06 01:07:55 +02:00
UNITRONIX 2818dcab10 test(agent): add test for malformed certificate pins in release profiles
- Introduced a new test to validate that malformed certificate pins in release profiles are correctly rejected, ensuring improved error handling and security in agent bundle configurations.
2026-08-06 00:55:10 +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 1b240543bd feat(auth): implement SQLite auth consolidation and admin password validation
- Added functionality for safely consolidating legacy auth.db into the selected SQLite database, with options for dry runs and rollbacks.
- Introduced command-line flags for SQLite auth consolidation, including backup directory and rollback options.
- Enhanced admin interface security by requiring a password when the admin port is enabled, preventing unauthorized access.
- Updated related tests to ensure proper handling of admin password requirements and relay authorization logic.
2026-08-05 23:49:42 +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 f8ed6bec9f fix(theme): stop solid blue flash on Light/Dark toggle (#320)
Theme preview wrote solid hex into muted tokens; convert to rgba like branding.css so filters, nav, and avatar stay translucent.
2026-08-03 23:02:33 +02:00
UNITRONIX 992ba235f7 feat: enhance Support Agent capabilities and documentation
- Added support for various remote control features in the Support Agent, including file transfer, in-session chat, remote audio, and control actions (lock/restart).
- Introduced capability flags for incoming session features, allowing for more granular control over permissions.
- Updated documentation to reflect the new Support Agent functionalities and connection resilience improvements, including fallback mechanisms for API endpoints.
- Enhanced the build process with optional branding sealing and improved error handling for Docker configurations.
2026-08-03 06:47:22 +02:00
UNITRONIX 1408f904f3 fix(security): Address Book ACL filter and legacy role CHECK migration (#342)
Restrict GET /api/ab peers/tags to device-group scope and migrate upgraded
SQLite users tables off the pre-Phase-52 role CHECK so console sync works.
Refs #342.
2026-08-01 16:53:18 +02:00
UNITRONIX 62752125df fix(console): validate deploy-string public key and fall back to Go (#340)
Reject placeholder/invalid id_ed25519.pub values in Dashboard client config, prefer live Go /api/server-key, and set PUB_KEY_PATH in Windows NSSM console env.
2026-08-01 09:17:44 +02:00
UNITRONIX a8f73b05b9 fix(ci): replace operator LAN IP in OIDC redirect URL test
Use documentation-range 203.0.113.10 so Secret Scan (betterdesk-internal-lan-ip) passes on the main→dev sync PR.
2026-07-31 19:53:36 +02:00
UNITRONIX 6a1806b8f3 chore: sync main 3.4.3 into dev (#302 enrollment hardening)
Bring stable signal outbound gate hardening (initiator_pending_enrollment),
Web Remote SignedId verify, and open-issue hotfixes onto dev while keeping
the 3.4.13 development version baseline.
2026-07-31 19:48:44 +02:00
UNITRONIX 0189bcb25f fix(auth,signal): OIDC user.info, viewer-only outbound, Docker channel UX
RustDesk 1.4.x ignored OIDC auth-query success without user.info (#326).
TCP RegisterPk IP bind + client login token restore service-off outbound
without weakening managed pending rejection (#327/#302). Document Caddy
WSS/308 and clarify GHCR channel is image-tag based (#294/#299).

Refs #302 #304 #314 #315 #319 #320 #321 #323 #325 #326 #327 #294 #299
2026-07-30 19:10:44 +02:00
UNITRONIX 6767b41b97 fix(web-remote): harden SignedId key verify after #313 (Refs #313)
Reload id_ed25519.pub per viewer render and verify RelayResponse.pk then SignedId with the correct RustDesk key chain so base64 Keys work; desktop signature-mismatch without Key remains expected config.
2026-07-29 20:10:01 +02:00
UNITRONIX 21e0d02e3d fix(users): fail closed on last-admin delete mirror (Fixes #315)
Prevent false UI success when Go refuses deleting the last Super Admin on dual-SQLite; mirror before local delete and keep installer admin reset unchanged.
2026-07-29 19:59:37 +02:00
UNITRONIX 493a27eaf3 feat(rateLimiter): add resolveApiPath function for accurate API path resolution
- Introduced resolveApiPath to handle cases where Express strips the `/api` prefix from req.path, ensuring correct path classification for rate-limiting.
- Updated isPanelPollRequest and isPanelPreferenceWrite functions to utilize resolveApiPath for improved accuracy.
- Added tests to verify the functionality of resolveApiPath and its integration with existing rate-limiting logic.
2026-07-26 10:30:44 +02:00
UNITRONIX 393b86b858 fix(ux): resolve branding wallpaper visibility issues in UX 3.5
- Adjusted z-index properties for the console shell and main content to ensure visibility over the branding wallpaper.
- Updated CSS to maintain proper stacking context, preventing text from being obscured by the wallpaper.
- Enhanced documentation to clarify changes related to stacking and branding wallpaper behavior.

This update addresses user feedback regarding visibility issues in the UX 3.5 interface.
2026-07-26 10:14:21 +02:00
UNITRONIX 261a7fcd78 fix(ux): resolve light theme issues and enhance theme management
- Fixed light theme to correctly apply the blue topbar and ensure text colors are consistent with the selected theme.
- Updated theme management to persist the selected theme and its corresponding palette across sessions.
- Enhanced documentation to clarify theme color mappings and behavior.
- Introduced built-in theme palettes for light and dark modes to streamline theme application.
- Improved CSS variable handling for better theme integration in the UI.

This update addresses user feedback regarding theme inconsistencies and improves overall theme functionality.
2026-07-26 10:09:54 +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 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