Merge pull request #5107 from Hoshpak/CVE-2016-7966-2
kdepimlibs: add CVE-2016-7966_part2.patch
This commit is contained in:
commit
e8086e3943
2 changed files with 30 additions and 1 deletions
29
srcpkgs/kdepimlibs/patches/CVE-2016-7966_part2.patch
Normal file
29
srcpkgs/kdepimlibs/patches/CVE-2016-7966_part2.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
--- kpimutils/linklocator.cpp
|
||||
+++ kpimutils/linklocator.cpp
|
||||
@@ -389,7 +389,23 @@
|
||||
bool badUrl = false;
|
||||
str = locator.getUrlAndCheckValidHref(&badUrl);
|
||||
if (badUrl) {
|
||||
- return locator.mText;
|
||||
+ QString resultBadUrl;
|
||||
+ const int helperTextSize(locator.mText.count());
|
||||
+ for (int i = 0; i < helperTextSize; ++i) {
|
||||
+ const QChar chBadUrl = locator.mText[i];
|
||||
+ if (chBadUrl == QLatin1Char('&')) {
|
||||
+ resultBadUrl += QLatin1String("&");
|
||||
+ } else if (chBadUrl == QLatin1Char('"')) {
|
||||
+ resultBadUrl += QLatin1String(""");
|
||||
+ } else if (chBadUrl == QLatin1Char('<')) {
|
||||
+ resultBadUrl += QLatin1String("<");
|
||||
+ } else if (chBadUrl == QLatin1Char('>')) {
|
||||
+ resultBadUrl += QLatin1String(">");
|
||||
+ } else {
|
||||
+ resultBadUrl += chBadUrl;
|
||||
+ }
|
||||
+ }
|
||||
+ return resultBadUrl;
|
||||
}
|
||||
|
||||
if ( !str.isEmpty() ) {
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'kdepimlibs'
|
||||
pkgname=kdepimlibs
|
||||
version=4.14.3
|
||||
revision=4
|
||||
revision=5
|
||||
short_desc="KDE PIM Libraries"
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
license="GPL-2, LGPL-2.1, FDL"
|
||||
|
|
Loading…
Reference in a new issue