mirror of
https://github.com/db9979/sshtermy.git
synced 2026-12-05 12:24:08 +01:00
* Absturzschutz: Fehler in Hintergrundarbeit beenden sshTermy nicht mehr; Zeitgrenzen für Update-Download und Team-Abo; Gast-Tasten über Warteschlange Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * CI: Zeitgrenzen je Job, alte Läufe abbrechen, Tests in zufälliger Reihenfolge; make check; Bibliotheken aktualisiert Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * update: Stillstand auch ohne Lesefehler erkennen Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Zufallstests für Teilen, Vermittler, MCP, Syslog, KI-Antworten, Sync und Fenster-Rahmen; Syslog-Empfang übersteht kaputte Pakete; MCP antwortet auch nach Fehler Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Tests: Tresor (Passwortwechsel, Sperre, Blobs, KDF-Grenzen), SFTP-Rundreise, serielle Konsole mit Ersatzkabel Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Dauerlauf-Test (make soak) und nächtlicher Lauf mit langen Zufallstests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Fuzz: Zeitlimit je Eingabe auch für die neuen Tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Selbstprüfung: sshtermy doctor und Palette › Hilfe › Fehlersuche; versehentlich eingecheckte Programmdatei entfernt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Oberfläche aufteilen, erster Schritt: Mausbereiche (ui/clickzone) und abgelegte Dateien (ui/dropped) als eigene Pakete Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Doku: Absturzschutz und Selbstprüfung in README, Webseite und Handbuch; Plan zur Aufteilung von internal/ui; Zusehen-WASM neu gebaut Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj --------- Co-authored-by: Claude <noreply@anthropic.com>
48 lines
1.2 KiB
Go
48 lines
1.2 KiB
Go
package sharewire
|
|
|
|
import (
|
|
"bytes"
|
|
"testing"
|
|
|
|
"github.com/db9979/sshtermy/internal/fuzzguard"
|
|
)
|
|
|
|
// Rahmen und Einladungen kommen von fremden Rechnern (Zuschauer, Vermittler):
|
|
// nichts davon darf sshTermy zum Absturz bringen.
|
|
func FuzzOpen(f *testing.F) {
|
|
key := bytes.Repeat([]byte{7}, 32)
|
|
good, _ := Seal(key, "sitzung", 3, []byte("hallo"))
|
|
f.Add(good, "sitzung")
|
|
f.Add([]byte{}, "")
|
|
f.Add(make([]byte, 41), "x")
|
|
f.Fuzz(func(t *testing.T, frame []byte, id string) {
|
|
fuzzguard.Run(t, func() {
|
|
typ, p, err := Open(key, id, frame)
|
|
if err == nil {
|
|
// nur echte Rahmen gehen durch: neu versiegelt wieder lesbar
|
|
again, _ := Seal(key, id, typ, p)
|
|
if t2, p2, err := Open(key, id, again); err != nil || t2 != typ || !bytes.Equal(p2, p) {
|
|
t.Errorf("Rundreise kaputt: %v", err)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
func FuzzInvite(f *testing.F) {
|
|
f.Add("7-taube-kompass-ofen")
|
|
f.Add("sshtermy://zusehen/7-taube-kompass-ofen")
|
|
f.Add("https://example.org/zusehen/#7 taube")
|
|
f.Add("\x00\xff 🐟")
|
|
f.Fuzz(func(t *testing.T, s string) {
|
|
fuzzguard.Run(t, func() {
|
|
_, _ = ParseInvite(s)
|
|
_, _ = NormBase(s)
|
|
_ = IsFP(s)
|
|
if c := Clean(s, 40); len(c) > 40+4 {
|
|
t.Errorf("Clean zu lang: %d", len(c))
|
|
}
|
|
})
|
|
})
|
|
}
|