trying to get submit form to work...

This commit is contained in:
Eric LAZO
2022-08-12 20:08:49 +02:00
parent c7bbf29a1b
commit 4d395088d0
5 changed files with 24 additions and 8 deletions

View File

@@ -194,7 +194,7 @@ void ConfigParser::_set_server_values(ServerConfig *server, \
{
if (tmp_val[0].find_first_of(":") == NPOS)
{
if (!::isNumeric(tmp_val[0]))
if (!::isNumeric_btw(0, 65535, tmp_val[0]))
throw std::invalid_argument("bad port number");
server->host = "0.0.0.0";
server->port = tmp_val[0];
@@ -211,7 +211,7 @@ void ConfigParser::_set_server_values(ServerConfig *server, \
if (!::isNumeric_btw(0, 255, ip[i]))
throw std::invalid_argument("bad host ip");
}
if (!::isNumeric(tmp2[1]))
if (!::isNumeric_btw(0, 65535, tmp2[1]))
throw std::invalid_argument("bad port number");
server->host = tmp2[0];
server->port = tmp2[1];