mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2024-11-24 12:16:40 +01:00
Don't allow blank server address
This commit is contained in:
parent
34fc6c2eaa
commit
1287cb2f9f
@ -31,6 +31,10 @@ import java.net.SocketAddress;
|
||||
public class AddressUtil {
|
||||
|
||||
public static SocketAddress parse(final String serverAddress, final ProtocolVersion version) {
|
||||
if (serverAddress.isBlank()) {
|
||||
throw new IllegalArgumentException("Server address cannot be blank");
|
||||
}
|
||||
|
||||
if (serverAddress.startsWith("file:///") || serverAddress.startsWith("unix:///")) { // Unix Socket
|
||||
final String filePath = serverAddress.substring(7);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user