File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Validators Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,10 @@ class FilterNameValidator extends Validator {
2222 * @throws ValidationError When the value is not a valid firewall filter name.
2323 */
2424 public function validate (mixed $ value , string $ field_name = '' ): void {
25- global $ pf_reserved_keywords , $ reserved_table_names ;
25+ $ reserved_names = get_pf_reserved () ;
2626
2727 # Throw an exception if this name is reserved
28- if (in_array ($ value , array_merge ( $ pf_reserved_keywords , $ reserved_table_names ) )) {
28+ if (in_array ($ value , $ reserved_names )) {
2929 throw new ValidationError (
3030 message: "Field ' $ field_name' cannot be ' $ value' because it is a name reserved by the system. " ,
3131 response_id: 'FILTER_NAME_VALIDATOR_RESERVED_NAME_USED ' ,
You can’t perform that action at this time.
0 commit comments