mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-09-03 17:33:47 +00:00
Add secure host CLI bridge and harden OTA workflows
Expose the Full Companion terminal over TCP and add an authenticated, replay-resistant host command service with documented CPU temperature, reboot, and allowlisted program examples.\n\nImprove LoRa OTA diagnostics and persistent CLI handling, reduce clock correction drift to ten minutes, and make mOTA stream flush behavior an explicit transport policy with regression coverage.
This commit is contained in:
@@ -319,14 +319,27 @@ TEST(CLICommandUtils, RejectsMalformedTerminalPaths) {
|
||||
"A1B2C3,D4E5F6", route, sizeof(route), 63, path));
|
||||
}
|
||||
|
||||
TEST(CLICommandUtils, MasksOnlyTerminalLoginPasswordInput) {
|
||||
TEST(CLICommandUtils, MasksTerminalPasswordInput) {
|
||||
EXPECT_FALSE(mesh::cli::shouldMaskTerminalInput("login"));
|
||||
EXPECT_FALSE(mesh::cli::shouldMaskTerminalInput("login "));
|
||||
EXPECT_TRUE(mesh::cli::shouldMaskTerminalInput("login s"));
|
||||
EXPECT_TRUE(mesh::cli::shouldMaskTerminalInput("LOGIN s"));
|
||||
EXPECT_TRUE(mesh::cli::shouldMaskTerminalInput(" login secret phrase"));
|
||||
EXPECT_FALSE(mesh::cli::shouldMaskTerminalInput("set wifi.pwd"));
|
||||
EXPECT_FALSE(mesh::cli::shouldMaskTerminalInput("set wifi.pwd "));
|
||||
EXPECT_TRUE(mesh::cli::shouldMaskTerminalInput("set wifi.pwd s"));
|
||||
EXPECT_TRUE(mesh::cli::shouldMaskTerminalInput("SET WIFI.PWD secret phrase"));
|
||||
EXPECT_TRUE(mesh::cli::shouldMaskTerminalInput(" set wifi.pwd secret"));
|
||||
EXPECT_FALSE(mesh::cli::shouldMaskTerminalInput("cmd login secret"));
|
||||
EXPECT_FALSE(mesh::cli::shouldMaskTerminalInput("cmd set wifi.pwd secret"));
|
||||
EXPECT_FALSE(mesh::cli::shouldMaskTerminalInput("set wifi.pwd-status secret"));
|
||||
EXPECT_FALSE(mesh::cli::shouldMaskTerminalInput("login-status"));
|
||||
|
||||
const char* login = " login secret phrase";
|
||||
EXPECT_STREQ("secret phrase", mesh::cli::terminalPasswordInput(login));
|
||||
const char* wifi = "set wifi.pwd secret phrase";
|
||||
EXPECT_STREQ("secret phrase", mesh::cli::terminalPasswordInput(wifi));
|
||||
EXPECT_EQ(nullptr, mesh::cli::terminalPasswordInput("set wifi.pwd "));
|
||||
}
|
||||
|
||||
TEST(CLICommandUtils, BackspaceErasesAsciiAndUtf8Characters) {
|
||||
|
||||
Reference in New Issue
Block a user