Fix provision auto_insert_enabled
This commit is contained in:
@@ -223,11 +223,6 @@
|
|||||||
syslog(LOG_WARNING, '['.$_SERVER['REMOTE_ADDR']."] provision attempt but the remote auth server said no for ".escape($_REQUEST['mac']));
|
syslog(LOG_WARNING, '['.$_SERVER['REMOTE_ADDR']."] provision attempt but the remote auth server said no for ".escape($_REQUEST['mac']));
|
||||||
http_error('404');
|
http_error('404');
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
//check for a valid match
|
|
||||||
if (empty($device_uuid)) {
|
|
||||||
http_error(403);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//use the device address to get the vendor
|
//use the device address to get the vendor
|
||||||
@@ -247,6 +242,11 @@
|
|||||||
//get all provision settings
|
//get all provision settings
|
||||||
$provision = $settings->get('provision', null, []);
|
$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
|
//check the cidr range
|
||||||
if (!empty($provision['cidr'])) {
|
if (!empty($provision['cidr'])) {
|
||||||
$found = false;
|
$found = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user