We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a9a2fc commit cade7b7Copy full SHA for cade7b7
src/session_network.cpp
@@ -184,12 +184,18 @@ namespace {
184
else
185
ip = json["ip"].get<std::string>();
186
187
+ if (ip == "0.0.0.0")
188
+ throw std::runtime_error{"Invalid IP address"};
189
+
190
uint16_t port;
191
if (json.contains("storage_lmq_port"))
192
port = json["storage_lmq_port"].get<uint16_t>();
193
194
port = json["port_omq"].get<uint16_t>();
195
196
+ if (port == 0)
197
+ throw std::runtime_error{"Invalid lmq port"};
198
199
swarm_id_t swarm_id = INVALID_SWARM_ID;
200
if (json.contains("swarm_id"))
201
swarm_id = json["swarm_id"].get<swarm_id_t>();
0 commit comments