This repository was archived by the owner on Dec 17, 2021. It is now read-only.

Description
We noticed recently that we were getting failures for domains with www[0-9]..
Case in point, www1.canada.ca, where pshtt, would recognize the relevant domains, but then sslyze was failing, as it was scanning www.www1.canada.ca
Relevent references to code below. Just curious if others had seen this behaviour, and had a better idea to fix then mine.
|
if utils.domain_uses_www(domain, cache_dir=cache_dir): |
which calls
|
if domain.startswith("www."): |
Suggest a basic change to drop the "." in the startswith condition.
# Check whether we have HTTP behavior data cached for a domain.
# If so, check if we know it canonically prepends 'www'.
def domain_uses_www(domain, cache_dir="./cache"):
# Don't prepend www to www.
if domain.startswith("www."):
return False
Thoughts?