summaryrefslogtreecommitdiffstats
path: root/tdeio
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2018-07-26 18:44:37 +0200
committerSlávek Banko <slavek.banko@axis.cz>2018-07-26 18:44:37 +0200
commita3b86c26903ade446ac57afc8c3f8a9c1bd66390 (patch)
tree395cb01a0ee58b4747affd47f89dcbecdbfb877c /tdeio
parentaa83c86cd30e77bad7fdb2b047ce256a24c883b5 (diff)
downloadtdelibs-a3b86c26903ade446ac57afc8c3f8a9c1bd66390.tar.gz
tdelibs-a3b86c26903ade446ac57afc8c3f8a9c1bd66390.zip
Fix security issue CVE-2017-6410
[taken from RedHat kdelibs patches] Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'tdeio')
-rw-r--r--tdeio/misc/kpac/script.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/tdeio/misc/kpac/script.cpp b/tdeio/misc/kpac/script.cpp
index 55faef8a1..fa1201382 100644
--- a/tdeio/misc/kpac/script.cpp
+++ b/tdeio/misc/kpac/script.cpp
@@ -446,10 +446,18 @@ namespace KPAC
if (!findObj.isValid() || !findObj.implementsCall())
throw Error( "No such function FindProxyForURL" );
+ KURL cleanUrl = url;
+ cleanUrl.setPass(QString());
+ cleanUrl.setUser(QString());
+ if (cleanUrl.protocol().lower() == "https") {
+ cleanUrl.setPath(QString());
+ cleanUrl.setQuery(QString());
+ }
+
Object thisObj;
List args;
- args.append(String(url.url()));
- args.append(String(url.host()));
+ args.append(String(cleanUrl.url()));
+ args.append(String(cleanUrl.host()));
Value retval = findObj.call( exec, thisObj, args );
if ( exec->hadException() ) {