Correctly handle SocksCmdResponse. Related to #2428
Motivation: Ports range check is not correct Modification: Allow port between 0 and 65535. 0 is wildcard / unknown port here Result: Correct validation
This commit is contained in:
parent
9707eba2b3
commit
79fc0d2408
@ -90,8 +90,8 @@ public final class SocksCmdResponse extends SocksResponse {
|
||||
}
|
||||
host = IDN.toASCII(host);
|
||||
}
|
||||
if (port <= 0 && port >= 65536) {
|
||||
throw new IllegalArgumentException(port + " is not in bounds 0 < x < 65536");
|
||||
if (port < 0 || port > 65535) {
|
||||
throw new IllegalArgumentException(port + " is not in bounds 0 <= x <= 65535");
|
||||
}
|
||||
this.cmdStatus = cmdStatus;
|
||||
this.addressType = addressType;
|
||||
|
Loading…
Reference in New Issue
Block a user