postfixadmin-cli.php:

- whitelist '-1' as valid value instead of misinterpreting it as option
  https://sourceforge.net/p/postfixadmin/bugs/369/
- don't remove quote chars (") from parameter values


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1837 a1433add-5e2c-0410-b055-b7f2511e0802
pull/19/head
Christian Boltz 8 years ago
parent 8ad849e7b6
commit 5dac4295a4

@ -413,8 +413,9 @@ class PostfixAdmin {
$this->params[$key] = true;
unset($params[$i]);
if (isset($params[++$i])) {
if ($params[$i]{0} !== '-') {
$this->params[$key] = str_replace('"', '', $params[$i]);
# TODO: ideally we should know if a parameter can / must have a value instead of whitelisting known valid values starting with '-' (probably only bool doesn't need a value)
if ($params[$i]{0} !== '-' or $params[$i] != '-1') {
$this->params[$key] = $params[$i];
unset($params[$i]);
} else {
$i--;

Loading…
Cancel
Save