Allow numeric subdomains in is_fqdn
parent
a52cc4101b
commit
f7c86acc23
|
@ -489,7 +489,6 @@ gboolean is_fqdn(char *addr)
|
||||||
|
|
||||||
// iterate over all parts of the name
|
// iterate over all parts of the name
|
||||||
for(idx = 0; idx <= dots; idx++){
|
for(idx = 0; idx <= dots; idx++){
|
||||||
contains_alpha = FALSE;
|
|
||||||
|
|
||||||
// if the part is empty
|
// if the part is empty
|
||||||
if(is_empty(parts[idx])){
|
if(is_empty(parts[idx])){
|
||||||
|
@ -521,11 +520,12 @@ gboolean is_fqdn(char *addr)
|
||||||
idx2++;
|
idx2++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// names consisting of only numbers are not legitimate
|
|
||||||
if(!contains_alpha){
|
}
|
||||||
success = FALSE;
|
// names consisting of only numbers are not legitimate
|
||||||
goto fqdn_end;
|
if(!contains_alpha){
|
||||||
}
|
success = FALSE;
|
||||||
|
goto fqdn_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
// might have a port suffix after a colon (e.g. tuwien.ac.at:8080)
|
// might have a port suffix after a colon (e.g. tuwien.ac.at:8080)
|
||||||
|
@ -578,4 +578,4 @@ gboolean is_base64(char *str)
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue