Skip to content

Commit 1971754

Browse files
fix(FilterAddressfield): always validate interface value if allow_interface_ip is enabled
1 parent 85ea38b commit 1971754

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Fields/FilterAddressField.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ class FilterAddressField extends InterfaceField {
251251
}
252252

253253
# Allow this value if it is an existing interface and interface values are allowed
254-
if ($this->allow_interface and in_array($value, array_keys($this->get_interface_choices()))) {
254+
$if_choices = array_keys($this->get_interface_choices());
255+
if (($this->allow_interface or $this->allow_interface_ip) and in_array($value, $if_choices)) {
255256
$this->labels[] = 'is_interface';
256257
return;
257258
}

0 commit comments

Comments
 (0)