Project

General

Profile

Bug #16900 ยป 16900.patch

Jim Pingle, 06/18/2026 06:33 PM

View differences:

src/usr/local/www/services_dhcp.php
if ($_POST['tftp'] && !is_ipaddrv4($_POST['tftp']) && !is_domain($_POST['tftp']) && !filter_var($_POST['tftp'], FILTER_VALIDATE_URL)) {
$input_errors[] = gettext("A valid IP address, hostname or URL must be specified for the TFTP server.");
}
if (($_POST['nextserver'] && !is_ipaddrv4($_POST['nextserver']))) {
/* Validate Network Booting */
if (($_POST['nextserver'] &&
!is_ipaddrv4($_POST['nextserver']))) {
$input_errors[] = gettext("A valid IP address must be specified for the network boot server.");
}
if (preg_match('("|;|}|{|\r|\n)', $_POST['filename']) === 1) {
$input_errors[] = gettext("Invalid Default BIOS File Name.");
}
if (preg_match('("|;|}|{|\r|\n)', $_POST['filename32']) === 1) {
$input_errors[] = gettext("Invalid UEFI 32 bit File Name.");
}
if (preg_match('("|;|}|{|\r|\n)', $_POST['filename64']) === 1) {
$input_errors[] = gettext("Invalid UEFI 64 bit File Name.");
}
if (preg_match('("|;|}|{|\r|\n)', $_POST['filename32arm']) === 1) {
$input_errors[] = gettext("Invalid ARM 32 bit File Name.");
}
if (preg_match('("|;|}|{|\r|\n)', $_POST['filename64arm']) === 1) {
$input_errors[] = gettext("Invalid ARM 64 bit File Name.");
}
if (preg_match('("|;|}|{|\r|\n)', $_POST['uefihttpboot']) === 1) {
$input_errors[] = gettext("Invalid UEFI HTTPBoot URL.");
}
if (preg_match('("|;|}|{|\r|\n)', $_POST['rootpath']) === 1) {
$input_errors[] = gettext("Invalid Root Path.");
}
if (gen_subnet($ifcfgip, $ifcfgsn) == $_POST['range_from']) {
$input_errors[] = gettext("The network address cannot be used in the starting subnet range.");
src/usr/local/www/services_dhcp_edit.php
if ($_POST['tftp'] && !is_ipaddrv4($_POST['tftp']) && !is_domain($_POST['tftp']) && !filter_var($_POST['tftp'], FILTER_VALIDATE_URL)) {
$input_errors[] = gettext("A valid IPv4 address, hostname or URL must be specified for the TFTP server.");
}
if (($_POST['nextserver'] && !is_ipaddrv4($_POST['nextserver']))) {
$input_errors[] = gettext("A valid IPv4 address must be specified for the network boot server.");
/* Validate Network Booting */
if (($_POST['nextserver'] &&
!is_ipaddrv4($_POST['nextserver']))) {
$input_errors[] = gettext("A valid IP address must be specified for the network boot server.");
}
if (preg_match('("|;|}|{|\r|\n)', $_POST['filename']) === 1) {
$input_errors[] = gettext("Invalid Default BIOS File Name.");
}
if (preg_match('("|;|}|{|\r|\n)', $_POST['filename32']) === 1) {
$input_errors[] = gettext("Invalid UEFI 32 bit File Name.");
}
if (preg_match('("|;|}|{|\r|\n)', $_POST['filename64']) === 1) {
$input_errors[] = gettext("Invalid UEFI 64 bit File Name.");
}
if (preg_match('("|;|}|{|\r|\n)', $_POST['filename32arm']) === 1) {
$input_errors[] = gettext("Invalid ARM 32 bit File Name.");
}
if (preg_match('("|;|}|{|\r|\n)', $_POST['filename64arm']) === 1) {
$input_errors[] = gettext("Invalid ARM 64 bit File Name.");
}
if (preg_match('("|;|}|{|\r|\n)', $_POST['uefihttpboot']) === 1) {
$input_errors[] = gettext("Invalid UEFI HTTPBoot URL.");
}
if (preg_match('("|;|}|{|\r|\n)', $_POST['rootpath']) === 1) {
$input_errors[] = gettext("Invalid Root Path.");
}
if (isset($_POST['arp_table_static_entry']) && empty($_POST['mac'])) {
$input_errors[] = gettext("A valid MAC address must be specified for use with static ARP.");
}
    (1-1/1)