From 9805f9685e3de42755d769ab31e73e30416cc1ef Mon Sep 17 00:00:00 2001 From: Johannes Huber Date: Fri, 4 Nov 2016 09:41:49 +0100 Subject: [PATCH] kde-frameworks/kcoreaddons: Remove vulnerable version Gentoo-bug: 596224 Package-Manager: portage-2.3.2 --- .../kcoreaddons-5.26.0-CVE-2016-7966.patch | 225 ------------------ .../kcoreaddons/kcoreaddons-5.26.0-r1.ebuild | 33 --- 2 files changed, 258 deletions(-) delete mode 100644 kde-frameworks/kcoreaddons/files/kcoreaddons-5.26.0-CVE-2016-7966.patch delete mode 100644 kde-frameworks/kcoreaddons/kcoreaddons-5.26.0-r1.ebuild diff --git a/kde-frameworks/kcoreaddons/files/kcoreaddons-5.26.0-CVE-2016-7966.patch b/kde-frameworks/kcoreaddons/files/kcoreaddons-5.26.0-CVE-2016-7966.patch deleted file mode 100644 index 71dc769c7a81..000000000000 --- a/kde-frameworks/kcoreaddons/files/kcoreaddons-5.26.0-CVE-2016-7966.patch +++ /dev/null @@ -1,225 +0,0 @@ -From 2a5142fecf8615ccfa3e7c1f9c088fa6ae5cc2a1 Mon Sep 17 00:00:00 2001 -From: Montel Laurent -Date: Wed, 21 Sep 2016 07:24:30 +0200 -Subject: [PATCH 1/2] Fix very old bug when we remove space in url as "foo - < >" - ---- - autotests/ktexttohtmltest.cpp | 14 ++++++++++++++ - src/lib/text/ktexttohtml.cpp | 14 ++++++++++++-- - 2 files changed, 26 insertions(+), 2 deletions(-) - -diff --git a/autotests/ktexttohtmltest.cpp b/autotests/ktexttohtmltest.cpp -index 474f0ca..8fc0c56 100644 ---- a/autotests/ktexttohtmltest.cpp -+++ b/autotests/ktexttohtmltest.cpp -@@ -30,6 +30,15 @@ QTEST_MAIN(KTextToHTMLTest) - - Q_DECLARE_METATYPE(KTextToHTML::Options) - -+#ifndef Q_OS_WIN -+void initLocale() -+{ -+ setenv("LC_ALL", "en_US.utf-8", 1); -+} -+Q_CONSTRUCTOR_FUNCTION(initLocale) -+#endif -+ -+ - void KTextToHTMLTest::testGetEmailAddress() - { - // empty input -@@ -372,6 +381,11 @@ void KTextToHTMLTest::testHtmlConvert_data() - QTest::newRow("url-in-parenthesis-3") << "bla (http://www.kde.org - section 5.2)" - << KTextToHTML::Options(KTextToHTML::PreserveSpaces) - << "bla (http://www.kde.org - section 5.2)"; -+ -+ // Fix url as foo < > when we concatened them. -+ QTest::newRow("url-with-url") << "foo >" -+ << KTextToHTML::Options(KTextToHTML::PreserveSpaces) -+ << "foo <http://www.kde.org/ <http://www.kde.org/>>"; - } - - -diff --git a/src/lib/text/ktexttohtml.cpp b/src/lib/text/ktexttohtml.cpp -index 8ed923d..b181f56 100644 ---- a/src/lib/text/ktexttohtml.cpp -+++ b/src/lib/text/ktexttohtml.cpp -@@ -228,11 +228,19 @@ QString KTextToHTMLHelper::getUrl() - - url.reserve(mMaxUrlLen); // avoid allocs - int start = mPos; -+ bool previousCharIsSpace = false; - while ((mPos < mText.length()) && - (mText[mPos].isPrint() || mText[mPos].isSpace()) && - ((afterUrl.isNull() && !mText[mPos].isSpace()) || - (!afterUrl.isNull() && mText[mPos] != afterUrl))) { -- if (!mText[mPos].isSpace()) { // skip whitespace -+ if (mText[mPos].isSpace()) { -+ previousCharIsSpace = true; -+ } else { // skip whitespace -+ if (previousCharIsSpace && mText[mPos] == QLatin1Char('<')) { -+ url.append(QLatin1Char(' ')); -+ break; -+ } -+ previousCharIsSpace = false; - url.append(mText[mPos]); - if (url.length() > mMaxUrlLen) { - break; -@@ -267,7 +275,6 @@ QString KTextToHTMLHelper::getUrl() - } - } while (url.length() > 1); - } -- - return url; - } - -@@ -334,6 +341,7 @@ QString KTextToHTML::convertToHtml(const QString &plainText, const KTextToHTML:: - QChar ch; - int x; - bool startOfLine = true; -+ //qDebug()<<" plainText"<parseEmoticons(result, true, exclude); - } -+ //qDebug()<<" result "< -Date: Fri, 30 Sep 2016 13:21:45 +0200 -Subject: [PATCH 2/2] Don't convert as url an url which has a " - ---- - autotests/ktexttohtmltest.cpp | 6 ++++++ - src/lib/text/ktexttohtml.cpp | 25 +++++++++++++++++++------ - src/lib/text/ktexttohtml_p.h | 2 +- - 3 files changed, 26 insertions(+), 7 deletions(-) - -diff --git a/autotests/ktexttohtmltest.cpp b/autotests/ktexttohtmltest.cpp -index 8fc0c56..c5690e8 100644 ---- a/autotests/ktexttohtmltest.cpp -+++ b/autotests/ktexttohtmltest.cpp -@@ -386,6 +386,12 @@ void KTextToHTMLTest::testHtmlConvert_data() - QTest::newRow("url-with-url") << "foo >" - << KTextToHTML::Options(KTextToHTML::PreserveSpaces) - << "foo <http://www.kde.org/ <http://www.kde.org/>>"; -+ -+ //Fix url exploit -+ QTest::newRow("url-exec-html") << "https://\">