clusev/app/Livewire
boban 359aa86aea fix(files): binary file content no longer breaks the Livewire snapshot (v0.9.54)
Opening a binary / non-UTF-8 file in the file manager threw "undefined is not
valid JSON". The editor bound the raw file bytes to its public $content
property; Livewire JSON-encodes the component snapshot, and invalid UTF-8 makes
PHP's json_encode return false, so the client received an empty response and
JSON.parse("undefined") failed (the trace in mergeNewSnapshot/deepClone).

Fixed at both layers: FleetService::readFile blanks the content when it detects
binary/non-UTF-8 (returns the binary flag instead), and FileEditor::load only
binds content for non-binary, non-oversize files. Binary/oversize files show
their existing notice; the snapshot is always valid UTF-8.

Tests: load blanks binary content (keeps the snapshot valid) and keeps valid
text content. 374 pass, Pint clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 05:49:05 +02:00
..
Audit feat(audit): paginate the log + DB-wide search (v0.9.50) 2026-06-21 23:58:27 +02:00
Auth harden(auth): capture login IP once, assert 2fa-failed audit 2026-06-20 18:06:11 +02:00
Concerns feat(auth): feed BruteforceGuard from login + 2FA failures, audit them 2026-06-20 18:01:54 +02:00
Files feat(security): signed confirm-action tokens + airtight backup-code reveal 2026-06-15 18:35:33 +02:00
Help feat(wg): WireGuard help topic (registration + DE/EN content + test) 2026-06-20 22:46:04 +02:00
Modals fix(files): binary file content no longer breaks the Livewire snapshot (v0.9.54) 2026-06-22 05:49:05 +02:00
Servers feat(security): signed confirm-action tokens + airtight backup-code reveal 2026-06-15 18:35:33 +02:00
Services feat(security): signed confirm-action tokens + airtight backup-code reveal 2026-06-15 18:35:33 +02:00
Settings harden(auth): fold IPv4-mapped IPv6, dedupe unbanAll, limit bans render, forged-token test 2026-06-20 18:53:52 +02:00
System fix(system): surface a failed restart sentinel write instead of a stuck state 2026-06-19 20:10:28 +02:00
Versions fix(versions): show what's-new (v-prefixed ref) + sidebar update badge (v0.9.51) 2026-06-22 00:19:27 +02:00
Wireguard feat(audit): readable action labels + failures surfaced (v0.9.48) 2026-06-21 23:41:48 +02:00
Dashboard.php i18n: complete DE/EN localization (modals, shell, backend) + v0.3.0 2026-06-13 23:27:42 +02:00
ServerSwitcher.php fix(ui): keep the sidebar server-switcher in sync with the viewed server 2026-06-14 19:24:56 +02:00