trying to get submit form to work...
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user