Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-12-SP1
kdelibs4-apidocs
kio-sanitize-url-for-proxy.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kio-sanitize-url-for-proxy.patch of Package kdelibs4-apidocs
From 1804c2fde7bf4e432c6cf5bb8cce5701c7010559 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid <aacid@kde.org> Date: Tue, 28 Feb 2017 19:08:50 +0100 Subject: [PATCH] Sanitize URLs before passing them to FindProxyForURL Remove user/password information For https: remove path and query Backport from kio f9d0cb47cf94e209f6171ac0e8d774e68156a6e4 --- kio/misc/kpac/script.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/kio/misc/kpac/script.cpp b/kio/misc/kpac/script.cpp index a595301..9ab360a 100644 --- a/kio/misc/kpac/script.cpp +++ b/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()) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor