Commit Graph

18 Commits

Author SHA1 Message Date
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
UNITRONIX edfd493be1 fix(console): avoid EACCES crash when binding HTTPS on port 443 (#173)
Security update H-7 runs the console as User=betterdesk, which cannot bind
ports below 1024 without CAP_NET_BIND_SERVICE. Fall back to high ports at
startup, add the capability to systemd when .env uses :443/:80, and handle
EACCES on listen without an unhandled process crash.
2026-06-07 16:29:49 +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 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 7c449d7976 Fix console crash when TRUST_PROXY=true in .env (#163)
Parse TRUST_PROXY env values safely so the string "true" maps to a single
proxy hop instead of crashing Express at startup with invalid IP address.
2026-06-05 02:14:40 +02:00
UNITRONIX 207a7467d0 fix(update): preserve operator config and passwords on upgrade (#158)
Merge .env keys instead of replacing files, patch systemd/NSSM in place,
block panel updates when the server cannot be rebuilt, and stop routine
updates from syncing admin passwords from .env into auth.db/PostgreSQL.
2026-06-04 00:13:12 +02:00