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));