From f7c86acc23560b0ec1289b09bf1443504e00f381 Mon Sep 17 00:00:00 2001 From: Daniel Ramos Date: Wed, 31 Oct 2018 22:17:23 -0400 Subject: [PATCH] Allow numeric subdomains in is_fqdn --- shared/utils.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/shared/utils.c b/shared/utils.c index 1378b4c..00601a3 100644 --- a/shared/utils.c +++ b/shared/utils.c @@ -489,7 +489,6 @@ gboolean is_fqdn(char *addr) // iterate over all parts of the name for(idx = 0; idx <= dots; idx++){ - contains_alpha = FALSE; // if the part is empty if(is_empty(parts[idx])){ @@ -521,11 +520,12 @@ gboolean is_fqdn(char *addr) idx2++; } - // names consisting of only numbers are not legitimate - if(!contains_alpha){ - success = FALSE; - goto fqdn_end; - } + + } + // names consisting of only numbers are not legitimate + if(!contains_alpha){ + success = FALSE; + goto fqdn_end; } // 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; -} \ No newline at end of file +}