Allow authenticated LoRa admins to read paged ACLs
This commit is contained in:
1 parent
395a440982
commit
b8ecd7fcac
10 files changed
+491
-10
No files matched your search
@@ -6,6 +6,7 @@
|
||||
#include <algorithm>
|
||||
#include <stdlib.h> // for qsort()
|
||||
#include <helpers/CLICommandUtils.h>
|
||||
#include <helpers/ClientACLCLI.h>
|
||||
#include <helpers/ClockSyncUtils.h>
|
||||
#include <helpers/ClientLoginPersistence.h>
|
||||
#include <helpers/ClientPathObservation.h>
|
||||
@@ -11809,6 +11810,9 @@ void MyMesh::handleCommand(uint32_t sender_timestamp, ClientInfo* sender, char *
|
||||
&& (strcmp(command, "get recent.repeater") == 0 || strcmp(command, "get recent.repeaters") == 0)) {
|
||||
printRecentRepeatersSerial();
|
||||
reply_start[0] = 0;
|
||||
} else if (mesh::cli::handleACLGet(acl, command, reply, 160 - 3,
|
||||
sender_timestamp == 0)) {
|
||||
// The page fits one LoRa reply, including an optional CLI prefix.
|
||||
} else if (sender_timestamp == 0 && strcmp(command, "get acl") == 0) {
|
||||
#if defined(WITH_WEBCONFIG) || defined(ETHERNET_ENABLED)
|
||||
if (_command_output) {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <helpers/FileRead.h>
|
||||
#include <helpers/radiolib/RxBoostedGainDefaults.h>
|
||||
#include <helpers/CLICommandUtils.h>
|
||||
#include <helpers/ClientACLCLI.h>
|
||||
#include <helpers/ClientLoginPersistence.h>
|
||||
#include <helpers/ClientPathPersistence.h>
|
||||
#include <helpers/LazyPersistence.h>
|
||||
@@ -2356,6 +2357,9 @@ void MyMesh::handleCommand(uint32_t sender_timestamp, char *command, char *reply
|
||||
strcpy(reply, "Err - bad pubkey");
|
||||
}
|
||||
}
|
||||
} else if (mesh::cli::handleACLGet(acl, command, reply, 160 - 3,
|
||||
sender_timestamp == 0)) {
|
||||
// The page fits one LoRa reply, including an optional CLI prefix.
|
||||
} else if (sender_timestamp == 0 && strcmp(command, "get acl") == 0) {
|
||||
#if defined(WITH_WEBCONFIG) || defined(ETHERNET_ENABLED)
|
||||
if (_command_output) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "SensorMesh.h"
|
||||
#include <helpers/CLICommandUtils.h>
|
||||
#include <helpers/ClientACLCLI.h>
|
||||
#include <helpers/ClientLoginPersistence.h>
|
||||
#include <helpers/ClientPathPersistence.h>
|
||||
#include <helpers/LazyPersistence.h>
|
||||
@@ -624,6 +625,9 @@ void SensorMesh::handleCommand(uint32_t sender_timestamp, char* command, char* r
|
||||
strcpy(reply, "Err - bad pubkey");
|
||||
}
|
||||
}
|
||||
} else if (mesh::cli::handleACLGet(acl, command, reply, 160 - 3,
|
||||
sender_timestamp == 0)) {
|
||||
// The page fits one LoRa reply, including an optional CLI prefix.
|
||||
} else if (sender_timestamp == 0 && strcmp(command, "get acl") == 0) {
|
||||
Stream& console = mesh::usbConsolePort();
|
||||
console.println("ACL:");
|
||||
|
||||
Reference in new issue
Block a user