mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
socks: a host name with control bytes or spaces is refused where it is read
This commit is contained in:
1 parent
83269785df
commit
61b5ae5e0b
5 files changed
+100
No files matched your search
@@ -139,6 +139,7 @@ void * sockschild(struct clientparam* param) {
|
||||
default:
|
||||
RETURN(997);
|
||||
}
|
||||
if(badhostname((char *)buf)) {RETURN(21);}
|
||||
if(PARAMSTR(param, hostname, buf)){RETURN(21);}
|
||||
if (ver == 5) {
|
||||
if ((res = sockgetcharcli(param, param->srv->timeouts[SINGLEBYTE_S], 0)) == EOF) {RETURN(441);}
|
||||
@@ -158,6 +159,7 @@ void * sockschild(struct clientparam* param) {
|
||||
param->service = S_SOCKS45;
|
||||
if(sockgetlinebuf(param, CLIENT, buf, BUFSIZE - 1, 0, param->srv->timeouts[STRING_S]) < 0) {RETURN(441);}
|
||||
buf[127] = 0;
|
||||
if(badhostname((char *)buf)) {RETURN(21);}
|
||||
if(PARAMSTR(param, hostname, buf)){RETURN(21);}
|
||||
if(!getip46m(param->srv->resolvmode, param->srv->family, buf, (struct sockaddr *) ¶m->req)) RETURN(100);
|
||||
param->sinsr = param->req;
|
||||
|
||||
Reference in new issue
Block a user