mirror of
https://github.com/ValdikSS/GoodbyeDPI.git
synced 2024-11-22 10:05:44 +01:00
Handle "0" in domain names
This commit is contained in:
parent
8383ecaadf
commit
55a3a94065
@ -415,7 +415,7 @@ static int extract_sni(const char *pktdata, unsigned int pktlen,
|
|||||||
}
|
}
|
||||||
/* Validate that hostname has only ascii lowercase characters */
|
/* Validate that hostname has only ascii lowercase characters */
|
||||||
for (int i=0; i<hnlen; i++) {
|
for (int i=0; i<hnlen; i++) {
|
||||||
if (!( (hnaddr[i] >= '1' && hnaddr[i] <= '9') ||
|
if (!( (hnaddr[i] >= '0' && hnaddr[i] <= '9') ||
|
||||||
(hnaddr[i] >= 'a' && hnaddr[i] <= 'z') ||
|
(hnaddr[i] >= 'a' && hnaddr[i] <= 'z') ||
|
||||||
hnaddr[i] == '.' || hnaddr[i] == '-'))
|
hnaddr[i] == '.' || hnaddr[i] == '-'))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user