diff options
| author | 2022-12-19 09:48:16 +0000 | |
|---|---|---|
| committer | 2022-12-19 09:48:16 +0000 | |
| commit | 4dff02f7ed5ca4d3e697851b6fcc19136e43c171 (patch) | |
| tree | 1d442d634542f81096740854551ed7226d6525ac /src/modules | |
| parent | Add an oper priv for exempting opers from blockamsg. (diff) | |
Consistently limit the range for config port fields.
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/m_ircv3_sts.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/utils.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_ircv3_sts.cpp b/src/modules/m_ircv3_sts.cpp index f7f03d7fa..1135efbc6 100644 --- a/src/modules/m_ircv3_sts.cpp +++ b/src/modules/m_ircv3_sts.cpp @@ -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()); diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 4c8357234..774e95f98 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -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 { |
