diff options
Diffstat (limited to 'web/process.php')
-rw-r--r-- | web/process.php | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/web/process.php b/web/process.php index a005319..e0bf38a 100644 --- a/web/process.php +++ b/web/process.php @@ -40,6 +40,8 @@ function sanitize_shellarg($arg) { + $arg = str_replace("\r\n", " ", $arg); + $arg = str_replace("\n", " ", $arg); return escapeshellarg($arg); } $sfi = array("options" => "sanitize_shellarg"); @@ -54,11 +56,12 @@ $password = filter_input(INPUT_POST, "password", FILTER_CALLBACK, $sfi); $rootPass = filter_input(INPUT_POST, "rootpassword", FILTER_CALLBACK, $sfi); $packagesList = filter_input(INPUT_POST, "packages", FILTER_CALLBACK, $sfi); + $use = filter_input(INPUT_POST, "use", FILTER_CALLBACK, $sfi); + $puse = filter_input(INPUT_POST, "puse", FILTER_CALLBACK, $sfi); + $features = filter_input(INPUT_POST, "features", FILTER_CALLBACK, $sfi); + $keywords = filter_input(INPUT_POST, "keywords", FILTER_CALLBACK, $sfi); $outputFormat = filter_input(INPUT_POST, "format", FILTER_CALLBACK, $sfi); - $packagesList = str_replace("\r\n", " ", $packagesList); - $packagesList = str_replace("\n", " ", $packagesList); - $iniString = "[vmconfig] BUILD_ID='$buildID' @@ -70,10 +73,10 @@ HOSTNAME=$hostname ROOT_PASSWORD=$rootPass DEFAULT_USERNAME=$username DEFAULT_PASSWORD=$password -USE_FLAGS='' -PACKAGE_USE='' -FEATURES='parallel-fetch userfetch userpriv getbinpkg' -PACKAGE_ACCEPT_KEYWORDS='' +USE_FLAGS='$use' +PACKAGE_USE='$puse' +FEATURES='$features' +PACKAGE_ACCEPT_KEYWORDS='$keywords' PACKAGES_LIST=$packagesList OUTPUT_FORMAT=$outputFormat"; |