certificatetransparency icon indicating copy to clipboard operation
certificatetransparency copied to clipboard

By default all hosts are included if the excluded hosts are not specified

Open hwdavr opened this issue 1 year ago • 0 comments

Not sure if this is an intentional design or a bug. From the below code in the library, if the host is not part of the excludeHosts, excludeHosts.any { it.matches(host) } will be false, and the whole condition return true, and the host will be checked for certificate transparency. Why the library have both excludeHosts and includeHosts? To me, we just need one of them.

private fun enabledForCertificateTransparency(host: String) = !excludeHosts.any { it.matches(host) } || includeHosts.any {
        it.matches(
            host
        )
    }

hwdavr avatar Nov 17 '23 01:11 hwdavr