Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit d1a0dc77 authored by Laurent Montel's avatar Laurent Montel 😁

Fix Bug 391594 - Explicitly setting 'Content-Type' header causes crash

FIXED-IN: 5.8.0

BUG: 391594
parent 9580bb34
......@@ -1078,9 +1078,14 @@ void ComposerPage::HeadersTab::save()
const int numberOfEntry = mHeaderList->topLevelItemCount();
for (int i = 0; i < numberOfEntry; ++i) {
item = mHeaderList->topLevelItem(i);
if (!item->text(0).isEmpty()) {
const QString str = item->text(0).trimmed();
if (!str.isEmpty()) {
if (str == QLatin1String("Content-Type")) {
KMessageBox::error(this, i18n("\'Content-Type\' is not an authorized string. This header will be not saved."), i18n("Invalid header"));
KConfigGroup config(KMKernel::self()->config(), QStringLiteral("Mime #%1").arg(numValidEntries));
config.writeEntry("name", item->text(0));
config.writeEntry("name", str);
config.writeEntry("value", item->text(1));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment