23 Commits

Author SHA1 Message Date
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 ec5b7f7d1f fix: update UX 3.5 topbar to be theme-invariant
The topbar now maintains a consistent dark chrome appearance regardless of the selected light or dark theme. This change ensures better readability and user experience across themes. Adjustments made in CSS and related documentation to reflect this behavior.
2026-08-01 23:32:59 +02:00
UNITRONIX 2e3ec3dd9a Refine UX 3.5 shell performance and styling
- Transitioned to solid surfaces in UX 3.5, disabling glass/blur effects for improved performance.
- Enhanced sidebar resizing with pointer capture and requestAnimationFrame for smoother interactions.
- Fixed sidebar font jumping in Settings/Updates and reduced theme toggle lag for immediate application.
- Updated documentation to reflect changes in UX 3.5 behavior and styling adjustments.
2026-07-26 21:56:55 +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 cbf72ca1e3 feat(ux): introduce UX 3.5 with new console shell and theme options
- Added UX 3.5 as the default console shell, featuring a full-list sidebar, topbar, and customizable themes (Dark/Light/Custom).
- Updated documentation to reflect the new UX 3.5 shell.
- Removed legacy Desktop Mode and Beta 3.1 styles, ensuring a streamlined user experience.
- Enhanced language support for new theme options across multiple languages.
- Fixed OIDC client login issues by proxying callback URLs to the Go API.

This update improves the overall user interface and experience, aligning with modern design standards.
2026-07-26 09:54:46 +02:00
UNITRONIX 6bcfd46fe7 feat(appearance): implement dynamic appearance loading and settings search functionality
Added functions to load and apply appearance settings dynamically based on user configuration. Introduced a search feature in the settings UI to filter through settings sections. Enhanced the branding readability alert to provide feedback on potential readability issues. Updated the backend to support a versioned appearance model and improved the branding API to include appearance data.
2026-06-20 19:42:17 +02:00
UNITRONIX f6d4112ef7 feat(styles): implement glass effect for sidebar backgrounds
Updated sidebar styles to use new glass background variables for both the sidebar rail and flyout. This change enhances the visual aesthetics by applying a semi-transparent glass effect, improving the overall UI experience. Additionally, adjustments were made to the theme CSS to ensure consistency across light and dark modes.
2026-06-18 18:46:59 +02:00
UNITRONIX 44ed9feebd feat: add glass surface feature with customizable options
- Introduced a new glass surface effect for cards, modals, and forms, enhancing the UI with a frosted glass appearance.
- Added localization strings for the glass surface feature in multiple languages.
- Implemented settings for enabling/disabling the glass effect, adjusting color, blur, and opacity through the settings interface.
- Updated CSS variables to support the new glass surface styling.
2026-06-14 11:14:47 +02:00
UNITRONIX b9f60752b1 feat: enhance branding and appearance settings
- Added a modular studio layout with a live preview panel, autosave, server-side appearance profiles, and a built-in theme gallery.
- Expanded Google Fonts picker and enabled custom font uploads (woff2/ttf).
- Updated the appearance tab for real-time changes without full page reloads and introduced a read-only mode for users without edit permissions.
- Improved localization by updating language files with new strings for branding and appearance features.
2026-06-14 10:47:15 +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 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 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 4d2ffeefc1 feat(branding): full white-label expansion of branding tab
Add console wallpaper, login page branding (title/subtitle/background/footer), global agent download page branding, footer/copyright with 'Powered by BetterDesk' toggle, and custom CSS injection. Includes background image upload route (8MB), sanitization for colors/gradients/CSS, dynamic theme CSS for app and login pages, sidebar attribution, and EN/PL/ZH i18n keys.

This commit was made possible thanks to Insolve.
2026-06-01 05:00:12 +02:00
UNITRONIX 4d2a4e0488 fix(api,ui): fix tags/groups, status type, operator permissions (#138)
UI: group chip buttons changed to icon-only (matching folder chips), Create Group tile styling unified with Create Folder, old .group-chip-action CSS replaced with unified .chip-action class.

Go server: peerResponse and singlePeerResponse now return status as int (1=active, 0=disabled) instead of string, added status_text for admin panel backward compat. Fixes RustDesk client crash 'type String is not a subtype of type int?'.

Go server: new handleUsersWithClientFallback — detects RustDesk client requests to /api/users and returns current user without requiring user.view permission. Fixes disappearing folders/groups caused by _getUsers() 403 short-circuiting _pull().

Node.js: normalisePeer updated to use status_text fallback for status_tier.

Branding: RustDesk Server Management -> BetterDesk Server Management across themes, i18n, settings. Console version bumped to 3.0.0.

This commit was made possible thanks to Insolve.
2026-05-28 01:46:19 +02:00
Knienartowicz de53408803 security: apply audit fixes (H-02/H-03/H-04/H-05) — branding, TOTP recovery codes, NodeSource SHA verification
Node.js (web-nodejs):

- H-02 (services/brandingService.js): tighten SVG sanitization (strip <style>/<use>/<image>, DOCTYPE/PI, CSS expression()/@import); export validateBrandingUrl() rejecting protocol-relative // and unknown schemes

- H-03 (routes/settings.routes.js): logo upload — whitelist /^logo-[0-9a-f]{16}.(png|jpg|jpeg|gif|webp|svg)$/i + path.resolve prefix check + fs.lstatSync symlink guard before deleting old logo

Go server (betterdesk-server):

- H-04 (auth/recovery.go NEW): TOTP recovery codes — GenerateRecoveryCodes (10 codes XXXX-XXXX-XX, unambiguous alphabet), HashRecoveryCodes (JSON array of bcrypt hashes, cost 10), ConsumeRecoveryCode (single-use, returns updated store)

- H-04 (db/database.go,sqlite.go,postgres.go): User.TOTPRecoveryCodes field with read/write via COALESCE-tolerant SELECTs (additive, backward-compat: column already existed from Phase 12 migration)

- H-04 (api/auth_handlers.go): handleConfirmTOTP returns plaintext recovery codes ONCE on enable; handleLogin2FA falls back to ConsumeRecoveryCode on invalid TOTP and audits with 2fa=recovery_code; handleDisableTOTP clears stored codes

Scripts:

- H-05 (betterdesk.sh): replace curl|bash piping with download-to-tempfile + validation — HTTPS-only (--proto=https --tlsv1.2), size sanity (1-500KB), shebang sanity check, SHA-256 logged, optional pinning via NODESOURCE_SHA256 env

Verification: go build ./... ✓, go vet ./... ✓ (exit 0), go test ./auth/... ./db/... ✓, jest 102/102 passed

This commit was made possible thanks to Insolve.
2026-05-26 14:57:01 +02:00
UNITRONIX 7b453d852f Security hardening and audit cleanup
Multiple security and maintenance fixes across components:

- betterdesk-mgmt: validate peer_id format to prevent injection in connect_to_peer (reject empty/oversized/invalid chars).
- betterdesk-mgmt (tauri.conf.json): tighten CSP by removing 'unsafe-eval' from script-src.
- betterdesk-agent-client: increase device ID entropy from 4 to 8 bytes (BD- prefix) to reduce collision/brute-force risk.
- betterdesk-server: enforce RBAC (operator+) before upgrading CDAP video WebSocket to block unauthorized access.
- betterdesk-server DBs: exclude soft_deleted peers in GetPeer queries for Postgres and SQLite.
- web-nodejs: add audit log housekeeping (hourly cleanup), add indices for audit_log, and implement cleanupOldAuditLogs(days) in sqlite adapter.
- web-nodejs brandingService: validate logo/favicon URLs to allow only http(s) or relative paths, preventing javascript:/data: XSS/SSRF vectors.
- docs: add AUDIT_BETTERDESK_2026-04-17.md (security audit summary).

These changes tighten client CSP, improve input validation, increase device identifier entropy, ensure RBAC is enforced before websocket upgrades, hide soft-deleted peers from normal queries, and add audit log maintenance and DB indexes for better performance and retention management.
2026-04-17 23:21:11 +02:00
UNITRONIX 86582d84cb Add font picker, text-logo and TLS fixes
Add typography support and a text-based logo option plus several TLS/connectivity improvements. Introduces a new font service (web-nodejs/services/fontService.js) to search, download and serve Google Fonts for self-hosting, new API routes for font management, and client-side font picker UI/logic (settings.js) with CSS (pages.css, main.css) and i18n entries (en/pl/zh). BrandingService now supports logo text/accent and font heading/body and includes generated font CSS. Views (login/sidebar) updated to render text logos and a new theme (themes/insolve.json) added. Server and TLS updates: API server now prefers TLS on the API port when valid certs exist, and dual-mode listener in tls.go adds a short peek timeout to avoid deadlocks with RustDesk clients.
2026-04-11 02:24:14 +02:00
UNITRONIX bc45956bb7 TCP/WS signaling fixes; branding & DB refactor
Make TCP and WebSocket signal handling consistent with UDP by sending immediate PunchHoleResponse/RelayResponse (including signed PK, socket_addr, relay server and NAT type) to initiators; add ForceRelay/AlwaysUseRelay handling and ensure WS uses TCP handler. Sign peer PKs for E2E verification and keep TCP keep-alive behavior for later updates.

Refactor web-nodejs branding and backup/database code: introduce async branding cache (loadBranding) and async save/reset/import APIs, add branding_config table and DB adapter methods (SQLite/Postgres) plus backup helper methods (getAllUsersForBackup, getAllAddressBooks, restoreUsers, getBackupStats). Update routes/services to use new async DB APIs, warm branding cache at server startup, and adjust heartbeat/register flows to use db helpers. Minor server error page i18n fallbacks and hbbs backend compatibility guard updated.

Also update docs (.github/copilot-instructions.md) to record the TCP signaling fix and Phase 7 resolution.

Co-Authored-By: Charles Olivier Savignac <1275666+sircharlo@users.noreply.github.com>
2026-03-04 22:58:35 +01:00
UNITRONIX e855f5786d Add Go server and security audit; update web console
Add a new betterdesk-server Go codebase (server, api, auth, db, relay, signal, metrics, audit, ratelimit, proto, tools, tests) and related deployment/migration scripts. Add a comprehensive SECURITY_AUDIT_2026-03-01 report and .gitattributes; update copilot-instructions (ALL-IN-ONE v2.4.0), README, VERSION, Dockerfiles, scripts, docker-compose and entrypoint. Large updates to web-nodejs (translations, routes, services, frontend assets and middleware) and numerous new utilities; remove legacy Flask web files and archive hbbs-patch-v2 artifacts. Prepares repository for PostgreSQL support, DB migration tooling and the new Go server as the production backend.
2026-03-02 00:43:04 +01:00
UNITRONIX 6ccf7c6130 Add Docker migration and branding UI
Introduce an interactive Docker migration flow and branding/theme support. Adds automatic/manual RustDesk-to-BetterDesk migration logic and menu option (betterdesk-docker.sh), plus a full migration guide (docs/DOCKER_MIGRATION.md) and README updates. Switches project license references to AGPL-3.0 and updates LICENSE locations for hbbs patches. Web console enhancements: new branding service and default theme, i18n middleware now injects branding, extended translations (en/pl), settings UI/JS and CSS for branding/theming, and login JS updated to include CSRF token. Also includes various view/template updates to surface branding across the UI.
2026-02-22 15:22:44 +01:00