From kde-commits Fri Dec 06 16:03:28 2002 From: Waldo Bastian Date: Fri, 06 Dec 2002 16:03:28 +0000 To: kde-commits Subject: KDE_3_0_BRANCH: kdesdk/kbugbuster/backend [POSSIBLY UNSAFE] X-MARC-Message: https://marc.info/?l=kde-commits&m=103919064516049 CVS commit by waba: Add proper quoting M +5 -5 mailsender.cpp 1.7.2.1 [POSSIBLY UNSAFE] --- kdesdk/kbugbuster/backend/mailsender.cpp:1.7 Sat Mar 2 11:28:24 2002 @@ -10,6 +10,7 @@ #include #include #include +#include #include "mailsender.h" #include "smtp.h" @@ -55,17 +56,16 @@ command = KStandardDirs::findExe(QString::fromLatin1("mail")); if (command.isNull()) return false; // give up - command.append(QString::fromLatin1(" -s \x22")); - command.append(subject); - command.append(QString::fromLatin1("\x22")); + command.append(QString::fromLatin1(" -s ")); + command.append(KShellProcess::quote(subject)); if (bcc) { command.append(QString::fromLatin1(" -b ")); - command.append(from); + command.append(KShellProcess::quote(from)); } command.append(" "); - command.append(to); + command.append(KShellProcess::quote(to)); needHeaders = false; }