File tree 1 file changed +4
-2
lines changed
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)
64
64
* - underscores which are used in SRV records.
65
65
* - Forward slashes such as are used for classless in-addr.arpa
66
66
* delegation (CNAMEs)
67
+ * - Asterisks may be used for wildcard domains in CNAMEs as seen in the
68
+ * real world.
67
69
* While RFC 2181 section 11 does state not to do validation,
68
70
* that applies to servers, not clients. Vulnerabilities have been
69
71
* reported when this validation is not performed. Security is more
70
72
* important than edge-case compatibility (which is probably invalid
71
73
* anyhow). */
72
74
static int is_hostnamech (int ch )
73
75
{
74
- /* [A-Za-z0-9-._/]
76
+ /* [A-Za-z0-9-* ._/]
75
77
* Don't use isalnum() as it is locale-specific
76
78
*/
77
79
if (ch >= 'A' && ch <= 'Z' )
@@ -80,7 +82,7 @@ static int is_hostnamech(int ch)
80
82
return 1 ;
81
83
if (ch >= '0' && ch <= '9' )
82
84
return 1 ;
83
- if (ch == '-' || ch == '.' || ch == '_' || ch == '/' )
85
+ if (ch == '-' || ch == '.' || ch == '_' || ch == '/' || ch == '*' )
84
86
return 1 ;
85
87
86
88
return 0 ;
You can’t perform that action at this time.
0 commit comments