mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-19 12:25:12 -04:00
lan servers: don't allow ports below 1024
This commit is contained in:
parent
a45bcbf52f
commit
95f288bf23
@ -126,7 +126,7 @@ object LANServerListener {
|
||||
rawAddress = rawAddress.split(":").toTypedArray()[1]
|
||||
}
|
||||
val port = rawAddress.toInt()
|
||||
check(port in 1 until 65535) { "Invalid port: $port" }
|
||||
check(port in 1024 until 65535) { "Invalid port: $port" }
|
||||
val motd = broadcast.getBetween(MOTD_START_STRING, MOTD_END_STRING)
|
||||
return Server(address = address.hostAddress + ":" + rawAddress, name = BaseComponent("LAN: #${SERVERS.size}: ", ChatComponent.of(motd)))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user