From 7f2bd7d53a741d0b98cc819578a659913b852fa1 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 28 Sep 2024 11:01:39 -0600 Subject: [PATCH] Fix provision auto_insert_enabled --- app/provision/index.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/provision/index.php b/app/provision/index.php index 6ab63de51d..218e4605e9 100644 --- a/app/provision/index.php +++ b/app/provision/index.php @@ -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;