mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 05:58:19 +00:00
Don't allow URLs without port from the masterserver
This commit is contained in:
parent
0369946156
commit
7bbd51cf73
|
@ -424,7 +424,10 @@ void CServerBrowserHttp::Refresh()
|
|||
}
|
||||
bool ServerbrowserParseUrl(NETADDR *pOut, const char *pUrl)
|
||||
{
|
||||
return net_addr_from_url(pOut, pUrl, nullptr, 0) != 0;
|
||||
int Failure = net_addr_from_url(pOut, pUrl, nullptr, 0);
|
||||
if(Failure || pOut->port == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
bool CServerBrowserHttp::Validate(json_value *pJson)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue