From b52cbb98d4584b6d92da40a23944f3cd14c1f5cb Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Mon, 3 Aug 2026 11:28:48 -0700 Subject: [PATCH] Fix ACL check when editing keys --- dhcpd/edit_keys.cgi | 7 ++----- dhcpd/save_keys.cgi | 2 ++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dhcpd/edit_keys.cgi b/dhcpd/edit_keys.cgi index dd8dd456b..06e0d05d1 100755 --- a/dhcpd/edit_keys.cgi +++ b/dhcpd/edit_keys.cgi @@ -9,14 +9,11 @@ require './dhcpd-lib.pl'; require './params-lib.pl'; &ReadParse(); +%access = &get_module_acl(); +$access{'global'} || &error($text{'keys_ecannot'}); $conf = &get_config(); @keys = ( &find("key", $conf), { } ); -# check acls -# %access = &get_module_acl(); -# &error_setup($text{'eacl_aviol'}); -# &error("$text{'eacl_np'} $text{'eacl_pss'}") if !&can('r',\%access,$sub); - if ($in{'new'}) { &ui_print_header($desc, $text{'keys_create'}, ""); } diff --git a/dhcpd/save_keys.cgi b/dhcpd/save_keys.cgi index 894be8bda..029c01bee 100755 --- a/dhcpd/save_keys.cgi +++ b/dhcpd/save_keys.cgi @@ -8,6 +8,8 @@ require './dhcpd-lib.pl'; require './params-lib.pl'; &ReadParse(); +%access = &get_module_acl(); +$access{'global'} || &error($text{'keys_ecannot'}); &lock_all_files(); $conf = &get_config();