diff options
author | 2011-07-27 21:25:15 +0100 | |
---|---|---|
committer | 2011-07-27 21:25:15 +0100 | |
commit | a9970aa2d0f32e2dd2de8fd837b369e3cf92ee37 (patch) | |
tree | cfe0a3b476ed2c35cfd823c9c322124752f144d9 | |
parent | Add missing IP address parameter when creating job entry (diff) | |
download | gentoaster-a9970aa2d0f32e2dd2de8fd837b369e3cf92ee37.tar.gz gentoaster-a9970aa2d0f32e2dd2de8fd837b369e3cf92ee37.tar.bz2 gentoaster-a9970aa2d0f32e2dd2de8fd837b369e3cf92ee37.zip |
Fix broken shell filter
-rw-r--r-- | web/process.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/web/process.php b/web/process.php index 1daaa86..cadbf98 100644 --- a/web/process.php +++ b/web/process.php @@ -31,19 +31,19 @@ function sanitize_shellarg($arg) { return escapeshellarg($arg); } - define("FILTER_SANITIZE_SHELL", array("options" => "sanitize_shellarg")); + $shellfilter = array("options" => "sanitize_shellarg"); $buildID = uniqid(); $bootMegabytes = filter_input(INPUT_POST, "boot_size", FILTER_VALIDATE_INT); $swapMegabytes = filter_input(INPUT_POST, "swap_size", FILTER_VALIDATE_INT); $rootMegabytes = filter_input(INPUT_POST, "root_size", FILTER_VALIDATE_INT); - $timezone = filter_input(INPUT_POST, "timezone", FILTER_SANITIZE_SHELL); - $hostname = filter_input(INPUT_POST, "hostname", FILTER_SANITIZE_SHELL); - $username = filter_input(INPUT_POST, "username", FILTER_SANITIZE_SHELL); - $password = filter_input(INPUT_POST, "password", FILTER_SANITIZE_SHELL); - $rootPass = filter_input(INPUT_POST, "rootpassword", FILTER_SANITIZE_SHELL); - $packagesList = filter_input(INPUT_POST, "packages", FILTER_SANITIZE_SHELL); - $outputFormat = filter_input(INPUT_POST, "format", FILTER_SANITIZE_SHELL); + $timezone = filter_input(INPUT_POST, "timezone", FILTER_CALLBACK, $shellfilter); + $hostname = filter_input(INPUT_POST, "hostname", FILTER_CALLBACK, $shellfilter); + $username = filter_input(INPUT_POST, "username", FILTER_CALLBACK, $shellfilter); + $password = filter_input(INPUT_POST, "password", FILTER_CALLBACK, $shellfilter); + $rootPass = filter_input(INPUT_POST, "rootpassword", FILTER_CALLBACK, $shellfilter); + $packagesList = filter_input(INPUT_POST, "packages", FILTER_CALLBACK, $shellfilter); + $outputFormat = filter_input(INPUT_POST, "format", FILTER_CALLBACK, $shellfilter); $packagesList = str_replace("\r\n", " ", $packagesList); $packagesList = str_replace("\n", " ", $packagesList); |