aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaik Broemme <mbroemme@libmpq.org>2015-12-02 23:44:44 (GMT)
committerMathias Gumz <akira@fluxbox.org>2018-03-11 12:49:06 (GMT)
commit0df41cf8385e0a31b4c9158aa182da52a50ba534 (patch)
tree567445669ac777dfa5a2b0c963efeed3a37d71a4
parent05d860eda73f5461a471fdafc404c9fdf680f4a7 (diff)
downloadfluxbox-0df41cf8385e0a31b4c9158aa182da52a50ba534.zip
fluxbox-0df41cf8385e0a31b4c9158aa182da52a50ba534.tar.bz2
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.
-rw-r--r--src/FbCommands.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc
index bc4b1e9..4714e11 100644
--- a/src/FbCommands.cc
+++ b/src/FbCommands.cc
@@ -175,7 +175,7 @@ FbTk::Command<void> *ExportCmd::parse(const string &command, const string &args,
175 if (command != "setresourcevalue") 175 if (command != "setresourcevalue")
176 FbTk::StringUtil::removeTrailingWhitespace(name); 176 FbTk::StringUtil::removeTrailingWhitespace(name);
177 size_t pos = name.find_first_of(command == "export" ? "=" : " \t"); 177 size_t pos = name.find_first_of(command == "export" ? "=" : " \t");
178 if (pos == string::npos || pos == name.size() || !trusted) 178 if (pos == string::npos || pos == name.size())
179 return 0; 179 return 0;
180 180
181 string value = name.substr(pos + 1); 181 string value = name.substr(pos + 1);