You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-07-29 22:41:11 +03:00
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
This commit is contained in:
@ -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--;
|
||||
|
Reference in New Issue
Block a user