Fixing IPRange validation for PUT on entities.

This commit is contained in:
stephb9959
2021-09-30 20:10:23 -07:00
parent 16835128a0
commit 54d5aba218
3 changed files with 3 additions and 3 deletions

2
build
View File

@@ -1 +1 @@
246
248

View File

@@ -181,7 +181,7 @@ namespace OpenWifi{
}
if(RawObject->has("sourceIP")) {
if(!NewEntity.sourceIP.empty() && CIDR::ValidateIpRanges(NewEntity.sourceIP)) {
if(!NewEntity.sourceIP.empty() && !CIDR::ValidateIpRanges(NewEntity.sourceIP)) {
BadRequest(RESTAPI::Errors::InvalidIPRanges);
return;
}

View File

@@ -1,4 +1,4 @@
{
"configuration" :
{ "uuid": "1" }
{ "uuid": 1 }
}