File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -64,14 +64,16 @@ static int ares__isprint(int ch)
6464 * - underscores which are used in SRV records.
6565 * - Forward slashes such as are used for classless in-addr.arpa
6666 * delegation (CNAMEs)
67+ * - Asterisks may be used for wildcard domains in CNAMEs as seen in the
68+ * real world.
6769 * While RFC 2181 section 11 does state not to do validation,
6870 * that applies to servers, not clients. Vulnerabilities have been
6971 * reported when this validation is not performed. Security is more
7072 * important than edge-case compatibility (which is probably invalid
7173 * anyhow). */
7274static int is_hostnamech (int ch )
7375{
74- /* [A-Za-z0-9-._/]
76+ /* [A-Za-z0-9-* ._/]
7577 * Don't use isalnum() as it is locale-specific
7678 */
7779 if (ch >= 'A' && ch <= 'Z' )
@@ -80,7 +82,7 @@ static int is_hostnamech(int ch)
8082 return 1 ;
8183 if (ch >= '0' && ch <= '9' )
8284 return 1 ;
83- if (ch == '-' || ch == '.' || ch == '_' || ch == '/' )
85+ if (ch == '-' || ch == '.' || ch == '_' || ch == '/' || ch == '*' )
8486 return 1 ;
8587
8688 return 0 ;
You can’t perform that action at this time.
0 commit comments