mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-05-22 16:44:48 +00:00
73389d842a
Pedro Rico, 19/05: after reinstalling the Monitor from GitHub a real SSH/web login failure went unnotified. Root cause was the auth_fail cooldown surviving across the service restart — install_proxmenux_beta extracts the new AppImage but leaves the notification_last_sent SQLite table intact (desirable: we don't want to lose legitimate cooldowns on every update). On startup `_load_cooldowns_from_db()` then loaded the stale auth_fail row from the previous run into the in-memory cache, and `_passes_cooldown` blocked the new event. This extends the existing reset-on-start mechanism (already in place for update_summary, proxmenux_update, post_install_update, …) to also clear auth_fail rows. A security-relevant event shouldn't be silenced because the same source IP happened to fail to log in yesterday. - Rename `_UPDATE_EVENT_TYPES_RESET_ON_START` → `_EVENT_TYPES_RESET_ON_START` (the list no longer covers only update-status reports). - Rename `_reset_update_cooldowns_on_start()` → `_reset_cooldowns_on_start()` for the same reason. - Add `'auth_fail'` to the curated list. High-frequency sources (log_critical_*, disk SMART errors, …) are deliberately NOT on this list — they keep their 24h cooldown across restarts to prevent inbox floods if the user toggles the service. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>