Support atomic two-packet signed fleet commands
Automatically split longer signed envelopes into two bounded group-data packets, reserve both before queueing, and roll back exact packet copies and retries on admission failure. Collect fragments in either order with a fixed deadline and verify the complete command before durable replay reservation and dispatch. Raise whole-fleet protocol capacity to 230 bytes, preserve target-specific budgets and radio acknowledgement barriers, and reject rule-token and USB rescue-line truncation. Document existing app input limits and add real-signature, sanitizer, queue failure, timeout, replay, and compact-board regressions.
This commit is contained in:
1 parent
d74a0f8b44
commit
fdad79eaf7
18 files changed
+1649
-143
No files matched your search
@@ -7956,12 +7956,12 @@ void MyMesh::setFloodPacketFilter(const char* args, char* reply,
|
||||
}
|
||||
}
|
||||
cursor = skipFloodFilterSpaces(cursor);
|
||||
if (strlen(cursor) >= 192) {
|
||||
char params[256];
|
||||
if (strlen(cursor) >= sizeof(params)) {
|
||||
strcpy(reply, "Err - rule parameters too long");
|
||||
return;
|
||||
}
|
||||
|
||||
char params[192];
|
||||
strcpy(params, cursor);
|
||||
char* tokens[18];
|
||||
int token_count = 0;
|
||||
@@ -8244,9 +8244,12 @@ void MyMesh::setFloodPacketFilter(const char* args, char* reply,
|
||||
}
|
||||
char rate_text[24];
|
||||
const bool compact = floodFilterAsciiStartsWith(tokens[i], "q=");
|
||||
StrHelper::strncpy(rate_text,
|
||||
tokens[i] + (compact ? 2 : strlen("rate=")),
|
||||
sizeof(rate_text));
|
||||
const char* value = tokens[i] + (compact ? 2 : strlen("rate="));
|
||||
if (strlen(value) >= sizeof(rate_text)) {
|
||||
strcpy(reply, "Err - rate value too long");
|
||||
return;
|
||||
}
|
||||
StrHelper::strncpy(rate_text, value, sizeof(rate_text));
|
||||
char* slash = strchr(rate_text, '/');
|
||||
if ((!compact && slash == NULL)
|
||||
|| (slash != NULL && !(strcmp(slash, "/min") == 0
|
||||
@@ -8574,12 +8577,16 @@ void MyMesh::setFloodPacketFilter(const char* args, char* reply,
|
||||
}
|
||||
}
|
||||
cursor = skipFloodFilterSpaces(cursor);
|
||||
if (strlen(cursor) >= 140) {
|
||||
#if MESH_ENABLE_FLEET_CONTROL
|
||||
char params[256];
|
||||
#else
|
||||
char params[140];
|
||||
#endif
|
||||
if (strlen(cursor) >= sizeof(params)) {
|
||||
strcpy(reply, "Err - filter parameters too long");
|
||||
return;
|
||||
}
|
||||
|
||||
char params[140];
|
||||
strcpy(params, cursor);
|
||||
char* tokens[7];
|
||||
int token_count = 0;
|
||||
@@ -10175,6 +10182,10 @@ void MyMesh::setFloodGroupModeration(const char* args, char* reply) {
|
||||
return;
|
||||
}
|
||||
char rate_text[24];
|
||||
if (strlen(option + 5) >= sizeof(rate_text)) {
|
||||
strcpy(reply, "Err - rate value too long");
|
||||
return;
|
||||
}
|
||||
StrHelper::strncpy(rate_text, option + 5, sizeof(rate_text));
|
||||
char* slash = strchr(rate_text, '/');
|
||||
if (slash == NULL || !(strcmp(slash, "/min") == 0 || strcmp(slash, "/m") == 0)) {
|
||||
|
||||
Reference in new issue
Block a user