0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-07 02:58:39 +02:00

Allow clients to have a resolved hostname of localhost

I slightly changed the patch to match surrounding style.

(cherry picked from commit 0b06270fd6266c85d19e008efcd039605daf59d0)
This commit is contained in:
Aaron Jones 2015-01-15 00:00:00 +00:00 committed by Jilles Tjoelker
parent 74b2fb72db
commit 3c80b42532

View file

@ -734,6 +734,9 @@ valid_hostname(const char *hostname)
if(hostname == NULL)
return NO;
if(!strcmp(hostname, "localhost"))
return YES;
if('.' == *p || ':' == *p || '/' == *p)
return NO;