mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Consistently limit the range for config port fields.
This commit is contained in:
parent
be6555384d
commit
4dff02f7ed
@ -180,7 +180,7 @@ class ModuleIRCv3STS : public Module
|
||||
if (host.empty())
|
||||
throw ModuleException("<sts:host> must contain a hostname, at " + tag->getTagLocation());
|
||||
|
||||
unsigned int port = tag->getUInt("port", 0, 0, UINT16_MAX);
|
||||
unsigned int port = tag->getUInt("port", 6697, 1, 65535);
|
||||
if (!HasValidSSLPort(port))
|
||||
throw ModuleException("<sts:port> must be a TLS port, at " + tag->getTagLocation());
|
||||
|
||||
|
@ -272,7 +272,7 @@ void SpanningTreeUtilities::ReadConfiguration()
|
||||
if (path.empty())
|
||||
{
|
||||
L->IPAddr = tag->getString("ipaddr");
|
||||
L->Port = tag->getUInt("port", 0);
|
||||
L->Port = tag->getUInt("port", 0, 1, 65535);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user