proxy url parser: look for @ from the right side

fixes usernames with @ in them.
this is only relevant for support of new url-style proxy addresses.
pull/307/head
rofl0r 2019-04-21 01:48:35 +01:00
parent e895fb713a
commit 067885694d
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,7 @@ static int proxy_from_string(const char *proxystring,
proxystring[next_token++] != ':' ||
proxystring[next_token++] != '/' ||
proxystring[next_token++] != '/') goto inv_string;
const char *at = strchr(proxystring+next_token, '@');
const char *at = strrchr(proxystring+next_token, '@');
if(at) {
if(proxytype == RS_PT_SOCKS4)
return 0;