diff --git a/include/tools.php b/include/tools.php index 279a877..232d58d 100644 --- a/include/tools.php +++ b/include/tools.php @@ -44,10 +44,16 @@ function isProcessRunning($processname) { } } +function clean($string) { + + return preg_replace('/[^A-Za-z0-9\-\/\ \.\_]/', '', $string); // Removes special chars. +} + function createConfigLines() { $out =""; foreach($_GET as $key=>$val) { if($key != "cmd") { + $val = clean($val); $out .= "define(\"$key\", \"$val\");"."\n"; } } diff --git a/version.php b/version.php index 636de92..fe451b7 100644 --- a/version.php +++ b/version.php @@ -1,3 +1,3 @@