Hello, after several testing I found that dnsDomainIs is not following the common behavior.
For now it works as follow:
def dnsDomainIs(host, domain):
if domain.startswith('.'):
domain = '*' + domain
return shExpMatch(host, domain)
Therefor it means that when you have case like this one:
host = "subdomain.domain.com"
domain = "domain.com" (note the missing '.' in front of the domain)
In this case def dnsDomainIs doesn't match. However when trying this case in multiple browser (chrome, firefox, ie) it does match.
It makes me think that it this would be a lot more accurate with this kind of implementation:
Hello, after several testing I found that dnsDomainIs is not following the common behavior.
For now it works as follow: def dnsDomainIs(host, domain): if domain.startswith('.'): domain = '*' + domain return shExpMatch(host, domain)
Therefor it means that when you have case like this one: host = "subdomain.domain.com" domain = "domain.com" (note the missing '.' in front of the domain)
In this case def dnsDomainIs doesn't match. However when trying this case in multiple browser (chrome, firefox, ie) it does match.
It makes me think that it this would be a lot more accurate with this kind of implementation:
def dnsDomainIs(host, domain): return host.endswith(domain)
Let me know what you think about it. Best regards,