]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fixed a security bug in dolphin when handling malformed http urls.
authorJose Carlos Norte <jose@eyeos.org>
Mon, 2 Mar 2009 00:03:21 +0000 (00:03 +0000)
committerJose Carlos Norte <jose@eyeos.org>
Mon, 2 Mar 2009 00:03:21 +0000 (00:03 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=933947

src/dolphinviewcontainer.cpp

index 95b16448a3b553d34aeb94a98ecbb514b287c9a3..5300553703bae977b1d53285ebd2b7e0e4af1b74 100644 (file)
@@ -41,6 +41,7 @@
 #include <konqmimedata.h>
 #include <konq_fileitemcapabilities.h>
 #include <konq_operations.h>
+#include <kshell.h>
 #include <kurl.h>
 #include <kurlcombobox.h>
 #include <krun.h>
@@ -406,7 +407,9 @@ void DolphinViewContainer::restoreView(const KUrl& url)
             showErrorMessage(i18nc("@info:status",
                                    "Protocol not supported by Dolphin, Konqueror has been launched"));
         }
-        const QString command = app + ' ' + url.pathOrUrl();
+
+        QString secureUrl = KShell::quoteArg(url.pathOrUrl());
+        const QString command = app + ' ' + secureUrl;
         KRun::runCommand(command, app, app, this);
     } else {
         showErrorMessage(i18nc("@info:status", "Invalid protocol"));