Commit 1804c2fd authored by Albert Astals Cid's avatar Albert Astals Cid

Sanitize URLs before passing them to FindProxyForURL

Remove user/password information
For https: remove path and query

Backport from kio f9d0cb47cf94e209f6171ac0e8d774e68156a6e4
parent ca490a7a
......@@ -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()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment