void-packages/srcpkgs/messagelib/patches/CVE-2018-19516.patch

29 lines
1.1 KiB
Diff

From 34765909cdf8e55402a8567b48fb288839c61612 Mon Sep 17 00:00:00 2001
From: Laurent Montel <montel@kde.org>
Date: Fri, 23 Nov 2018 07:37:02 +0100
Subject: Exclude Refresh from MetaData (Not necessary)
---
messageviewer/src/messagepartthemes/default/defaultrenderer.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp b/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp
index 15ffe44..07de293 100644
--- a/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp
+++ b/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp
@@ -308,6 +308,11 @@ QString processHtml(const QString &htmlSource, QString &extraHead)
return htmlSource;
}
extraHead = s.mid(startIndex + 6 , endIndex - startIndex - 6);
+ //Don't authorize to refresh content.
+ if (s.contains(QStringLiteral("http-equiv=\"REFRESH\""), Qt::CaseInsensitive)) {
+ extraHead.clear();
+ }
+
s = s.mid(endIndex + 7).trimmed();
}
--
cgit v0.11.2