17 Commits

Author SHA1 Message Date
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 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 d0b67352db Fix linux-ensure-console-user.js syntax regression that blocked console startup.
A bash fragment was accidentally left in the LE live-dir resolver, crashing ExecStartPre on every boot. Also infer certbot live path from certificate SAN when env metadata is missing.

Refs #219

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-30 06:42:02 +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 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 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 f832f6a57b fix(console): bare-metal SQLITE_READONLY_DIRECTORY on Go data dir (#206)
Apply setgid group-write on $RUSTDESK_PATH for the betterdesk console user,
re-sync permissions after the Go server starts, and verify both console data/
and Go data directories.

Fixes #206
2026-06-17 06:52:53 +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 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 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 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 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 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 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