Fix provision auto_insert_enabled

This commit is contained in:
FusionPBX 2024-09-28 11:01:39 -06:00 committed by GitHub
parent b9ebdf673e
commit 7f2bd7d53a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 5 deletions

View File

@ -223,11 +223,6 @@
syslog(LOG_WARNING, '['.$_SERVER['REMOTE_ADDR']."] provision attempt but the remote auth server said no for ".escape($_REQUEST['mac']));
http_error('404');
}
} else {
//check for a valid match
if (empty($device_uuid)) {
http_error(403);
}
}
//use the device address to get the vendor
@ -247,6 +242,11 @@
//get all provision settings
$provision = $settings->get('provision', null, []);
//check for a valid match
if (empty($device_uuid) && $settings->get('provision', 'auto_insert_enabled', 'false') !== 'true') {
http_error(403);
}
//check the cidr range
if (!empty($provision['cidr'])) {
$found = false;