kdelibs: add fix-kio-information-leak.patch (#5859)

patch taken from kdelibs upstream commit 1804c2fde7bf4e432c6cf5bb8cce5701c7010559
fixes an Information Leak when accessing https when using a malicious PAC file.
KDE Security advisory: https://www.kde.org/info/security/advisory-20170228-1.txt
No CVE assigned yet.
This commit is contained in:
Helmut Pozimski 2017-03-02 15:31:49 +01:00 committed by Alessio Sergi
parent fb8861d2da
commit b91d57ba84
2 changed files with 23 additions and 1 deletions

View file

@ -0,0 +1,22 @@
--- kio/misc/kpac/script.cpp
+++ kio/misc/kpac/script.cpp
@@ -754,9 +754,16 @@ namespace KPAC
}
}
+ KUrl cleanUrl = url;
+ cleanUrl.setUserInfo(QString());
+ if (cleanUrl.scheme().toLower() == QLatin1String("https")) {
+ cleanUrl.setPath(QString());
+ cleanUrl.setQuery(QString());
+ }
+
QScriptValueList args;
- args << url.url();
- args << url.host();
+ args << cleanUrl.url();
+ args << cleanUrl.host();
QScriptValue result = func.call(QScriptValue(), args);
if (result.isError()) {

View file

@ -1,7 +1,7 @@
# Template file for 'kdelibs'
pkgname=kdelibs
version=4.14.3
revision=7
revision=8
short_desc="KDE core libraries"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-2.0, LGPL-2.1, FDL"