From 6e33e4c882d04cc800b5db4593f17eb1f87042f3 Mon Sep 17 00:00:00 2001 From: Jon van Noort Date: Thu, 18 Jul 2019 04:17:19 +0800 Subject: [PATCH] changed call to parse_ini_file() to use INI_SCANNER_RAW, so that ini values are parsed as expected --- ajax/networking/gen_int_config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ajax/networking/gen_int_config.php b/ajax/networking/gen_int_config.php index 2cfdd4c5..d0f59ff3 100644 --- a/ajax/networking/gen_int_config.php +++ b/ajax/networking/gen_int_config.php @@ -4,12 +4,12 @@ include_once('../../includes/config.php'); include_once('../../includes/functions.php'); if(isset($_POST['generate']) && isset($_POST['csrf_token']) && CSRFValidate()) { - $cnfNetworking = array_diff(scandir(RASPI_CONFIG_NETWORKING, 1),array('..','.')); + $cnfNetworking = array_diff(scandir(RASPI_CONFIG_NETWORKING, 1),array('..','.','dhcpcd.conf')); $cnfNetworking = array_combine($cnfNetworking,$cnfNetworking); $strConfFile = ""; foreach($cnfNetworking as $index=>$file) { if($index != "defaults") { - $cnfFile = parse_ini_file(RASPI_CONFIG_NETWORKING.'/'.$file); + $cnfFile = parse_ini_file(RASPI_CONFIG_NETWORKING.'/'.$file, false, INI_SCANNER_RAW); if($cnfFile['static'] === 'true') { $strConfFile .= "interface ".$cnfFile['interface']."\n"; $strConfFile .= "static ip_address=".$cnfFile['ip_address']."\n";