mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Rockbox Utility: fix proxy password getting lost (FS#12166).
The proxy settings are stored as string representation in the configuration file. If username / password contains characters used as separators parsing the string again will cause wrong results. Percent-encode them before storing, and parse it as percent-encoded string when reading it back. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30071 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
dfd4183a7d
commit
a3875d7dfe
2 changed files with 16 additions and 5 deletions
|
|
@ -1240,11 +1240,13 @@ void RbUtilQt::updateInfo()
|
|||
|
||||
QUrl RbUtilQt::proxy()
|
||||
{
|
||||
QUrl proxy;
|
||||
if(RbSettings::value(RbSettings::ProxyType) == "manual")
|
||||
return QUrl(RbSettings::value(RbSettings::Proxy).toString());
|
||||
proxy.setEncodedUrl(RbSettings::value(RbSettings::Proxy).toByteArray());
|
||||
else if(RbSettings::value(RbSettings::ProxyType) == "system")
|
||||
return System::systemProxy();
|
||||
return QUrl("");
|
||||
proxy = System::systemProxy();
|
||||
qDebug() << proxy.userName() << proxy.password() << proxy.host() << proxy.port();
|
||||
return proxy;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue