Skip to content

0.11.0: alarms in the history, address book import and export - #28

Merged
Schnuecks merged 1 commit into
mainfrom
release-0.11.0
Oct 28, 2026
Merged

Schnuecks merged 1 commit into
mainfrom
release-0.11.0

Conversation

@Schnuecks

Copy link
Copy Markdown
Owner

Release 0.11.0.

Alarms in the history

The RustDesk app reports alarms to /api/audit/alarm. RDAPI has stored them since the start but never showed them. A new tab History → Alarms (/history/alarms) lists them like the file transfers: newest first, 20 per page, filterable by device. Admins see all devices, regular users only their own.

  • Alarm types follow the app's AlarmAuditType (0, 1, 2, 6, 7, 8, 9, 10); unknown codes show as "Other alarm (n)".
  • info is parsed defensively (broken JSON, wrong types); shown: address, ID and name of the other side, and the message of a session scope violation.

Address book import and export

On the address book page, a new panel Import and export:

  • Export (GET /address-book/export?book=…&format=json|csv) for everyone who can see the book. JSON carries the tags with their colours; CSV has the columns id, alias, note, tags, hostname, platform, username (tags joined by ;), starts with a UTF-8 BOM for spreadsheets, and prefixes cells starting with = + - @ to prevent formula injection.
  • Import (POST /address-book/import) for books the user may change. Accepts an RDAPI JSON export or a CSV table with an id column (comma or semicolon separated). New IDs are added, existing entries get the fields from the file and keep their tags, nothing is deleted. Field lengths are capped like in the web form; at most 5,000 entries; files up to just under the 2 MB request limit.
  • Saved passwords of the app (hash, password) are never exported and never taken from an import file; existing ones stay untouched.
  • Both are recorded in the activity log (ab_exported, ab_imported with counts).

Maintenance

Tested

  • pytest (158 passed, no warnings), ruff check, ruff format --check.
  • New tests: alarms (labels, details, unknown codes, broken payloads, filter, per-user visibility), export (no saved passwords, CSV formula prefix, BOM, file names, activity), import (merge, kept passwords, tag colours, length caps, CSV with comma and semicolon, missing ID column, bad files, too many entries, CSRF, read-only shared book, round trip of an export).
  • Image built and run against a copy of a production database: all pages 200 without console errors or failed requests; alarms tab with sample alarms; CSV import with umlauts in the browser, JSON and CSV downloads; the app API returns the imported entries and tags.

Not tested: the real RustDesk app sending a real alarm, and sign-in through a real OIDC provider.

@Schnuecks
Schnuecks merged commit 295be18 into main Oct 28, 2026
10 checks passed
@Schnuecks
Schnuecks deleted the release-0.11.0 branch October 28, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant