fix(tui,status,store): add delete confirm, input validation, XSS fix, history persistence
Prevent accidental deletes with y/n confirmation dialog. Validate all numeric form inputs (interval, port, timeout, threshold, retries) with range checks instead of silently defaulting to zero. Escape user-supplied data in status page JavaScript to close XSS via monitor names. Persist check history to new check_history table so sparklines and uptime percentages survive restarts.
This commit is contained in:
@@ -27,7 +27,11 @@ type Store interface {
|
||||
UpdateUser(id int, username, publicKey, role string) error
|
||||
DeleteUser(id int) error
|
||||
|
||||
// Phase 5: Backup & Restore
|
||||
// History
|
||||
SaveCheck(siteID int, latencyNs int64, isUp bool)
|
||||
LoadAllHistory(limit int) map[int][]models.CheckRecord
|
||||
|
||||
// Backup & Restore
|
||||
ExportData() models.Backup
|
||||
ImportData(data models.Backup) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user