Fix evaluating variables in ExportCmd
Don't evaluate trusted variables in *ExportCmd::parse as they will be always false for SetEnv, Export and SetResourceValue and never executed via fluxbox-remote.
This commit is contained in:
parent
05d860eda7
commit
0df41cf838
1 changed files with 1 additions and 1 deletions
|
@ -175,7 +175,7 @@ FbTk::Command<void> *ExportCmd::parse(const string &command, const string &args,
|
||||||
if (command != "setresourcevalue")
|
if (command != "setresourcevalue")
|
||||||
FbTk::StringUtil::removeTrailingWhitespace(name);
|
FbTk::StringUtil::removeTrailingWhitespace(name);
|
||||||
size_t pos = name.find_first_of(command == "export" ? "=" : " \t");
|
size_t pos = name.find_first_of(command == "export" ? "=" : " \t");
|
||||||
if (pos == string::npos || pos == name.size() || !trusted)
|
if (pos == string::npos || pos == name.size())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
string value = name.substr(pos + 1);
|
string value = name.substr(pos + 1);
|
||||||
|
|
Loading…
Reference in a new issue