From d82b780dda557f1fa9b3fb79faab2ced548f0396 Mon Sep 17 00:00:00 2001 From: Vladimir Dubrovin <3proxy@3proxy.ru> Date: Fri, 13 Nov 2026 17:51:09 +0300 Subject: [PATCH] proxy: credentials of an earlier request not inherited by the next --- src/proxy.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/proxy.c b/src/proxy.c index 6893baa..7940d25 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -314,6 +314,27 @@ for(;;){ clhdrofs_req = -1; param->nolongdatfilter = 0; + /* What the request brought belongs to it alone. A connection can carry + a request after another's, so the credentials of an earlier request + decide nothing for this one. */ + if(param->username){ + free(param->username); + param->username = NULL; + } + if(param->password){ + free(param->password); + param->password = NULL; + } + param->pwtype = 0; + if(param->extusername){ + free(param->extusername); + param->extusername = NULL; + } + if(param->extpassword){ + free(param->extpassword); + param->extpassword = NULL; + } + if(keepalive && (param->cliinbuf == param->clioffset) && (param->remsock != INVALID_SOCKET)){ memset(fds, 0, sizeof(fds));