From 067885694dede9fc31da258b482d0983b980ef4d Mon Sep 17 00:00:00 2001 From: rofl0r Date: Sun, 21 Apr 2019 01:48:35 +0100 Subject: [PATCH] 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. --- src/libproxychains.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libproxychains.c b/src/libproxychains.c index 6b6467c..8446bb0 100644 --- a/src/libproxychains.c +++ b/src/libproxychains.c @@ -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;