From f717d6735bfdc42b74e414bd696df9cce8ff8afb Mon Sep 17 00:00:00 2001 From: agessaman Date: Sun, 17 May 2026 21:19:53 -0700 Subject: [PATCH] Update alert PSK handling to restrict access based on sender timestamp Modified the alert PSK command handling to only respond when the sender timestamp is zero, ensuring that the PSK is processed exclusively from the serial command line. This change enhances security and clarity in the command processing logic. --- src/helpers/CommonCLI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/CommonCLI.cpp b/src/helpers/CommonCLI.cpp index b6ac0890..2544e16b 100644 --- a/src/helpers/CommonCLI.cpp +++ b/src/helpers/CommonCLI.cpp @@ -2053,7 +2053,7 @@ void CommonCLI::handleGetCmd(uint32_t sender_timestamp, char* command, char* rep #endif } else if (memcmp(config, "alert.hashtag", 13) == 0) { sprintf(reply, "> %s", _prefs->alert_hashtag[0] ? _prefs->alert_hashtag : "(unset)"); - } else if (memcmp(config, "alert.psk", 9) == 0) { + } else if (sender_timestamp == 0 && memcmp(config, "alert.psk", 9) == 0) { // from serial command line only sprintf(reply, "> %s", _prefs->alert_psk_hex[0] ? _prefs->alert_psk_hex : "(unset)"); } else if (memcmp(config, "alert.region", 12) == 0) { sprintf(reply, "> %s", _prefs->alert_region[0] ? _prefs->alert_region : "(unset, using default scope)");