Percent-decode proxy username and password.
This commit is contained in:
parent
d2a4d835de
commit
6b070dec98
10
src/http.cpp
10
src/http.cpp
@ -112,11 +112,17 @@ void API::http::set_proxy(const string &hostport, const string &userpw)
|
||||
|
||||
if (!userpw.empty())
|
||||
{
|
||||
string username;
|
||||
|
||||
pos = userpw.find(':');
|
||||
proxyconfig.username = userpw.substr(0, pos);
|
||||
Poco::URI::decode(userpw.substr(0, pos), username);
|
||||
proxyconfig.username = username;
|
||||
|
||||
if (pos != string::npos)
|
||||
{
|
||||
proxyconfig.password = userpw.substr(pos + 1);
|
||||
string password;
|
||||
Poco::URI::decode(userpw.substr(pos + 1), password);
|
||||
proxyconfig.password = password;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user