mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 09:38:19 +00:00
Merge pull request #8955 from furo321/url-master-parsing
Don't allow URLs without port from the masterserver
This commit is contained in:
commit
4b6f2e22a8
|
@ -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