mirror of
https://github.com/Laxilef/OTGateway.git
synced 2026-11-30 10:13:04 +05:00
fix: validate complete numeric command payloads
This commit is contained in:
1 parent
981cfefe74
commit
5fcf0af96d
3 files changed
+32
-9
No files matched your search
+1
-1
@@ -962,7 +962,7 @@ static void restApi() {
|
||||
// Validate payload length
|
||||
const auto& text = parameter->value();
|
||||
const auto payload = trimPayload(std::string_view(text.c_str(), text.length()));
|
||||
if (payload.size() >= 17) {
|
||||
if (payload.size() >= 32) {
|
||||
return request->send(400);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user