projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b19c2a8
)
Properly handle whitespace in script paths
author
Manuel Nickschas
<sputnick@quassel-irc.org>
Sat, 14 Mar 2009 22:49:14 +0000
(23:49 +0100)
committer
Manuel Nickschas
<sputnick@quassel-irc.org>
Sat, 14 Mar 2009 22:49:14 +0000
(23:49 +0100)
src/client/execwrapper.cpp
patch
|
blob
|
history
diff --git
a/src/client/execwrapper.cpp
b/src/client/execwrapper.cpp
index
cf5ac96
..
4958eb6
100644
(file)
--- a/
src/client/execwrapper.cpp
+++ b/
src/client/execwrapper.cpp
@@
-50,14
+50,14
@@
void ExecWrapper::start(const BufferInfo &info, const QString &command) {
// Make sure we don't execute something outside a script dir
if(_scriptName.contains("../") || _scriptName.contains("..\\"))
// Make sure we don't execute something outside a script dir
if(_scriptName.contains("../") || _scriptName.contains("..\\"))
- emit error(tr("Name \"%1\" is invalid:
/ or ../
are not allowed!").arg(_scriptName));
+ emit error(tr("Name \"%1\" is invalid:
../ or ..\\
are not allowed!").arg(_scriptName));
else {
foreach(QString scriptDir, Quassel::scriptDirPaths()) {
QString fileName = scriptDir + _scriptName;
if(!QFile::exists(fileName))
continue;
else {
foreach(QString scriptDir, Quassel::scriptDirPaths()) {
QString fileName = scriptDir + _scriptName;
if(!QFile::exists(fileName))
continue;
- _process.start(
fileName + ' '
+ params);
+ _process.start(
'"' + fileName + "\" "
+ params);
return;
}
emit error(tr("Could not find script \"%1\"").arg(_scriptName));
return;
}
emit error(tr("Could not find script \"%1\"").arg(_scriptName));