n3wt0n / AzureWebAppSSLManager

Acquires and manages free SSL certificates for Azure Web App and Azure Functions applications.
MIT License
76 stars 29 forks source link

Fix attempting to apply wildcards to the wrong hostnames #22

Closed thecontrarycat closed 4 years ago

thecontrarycat commented 4 years ago

When generating wildcard certificates we were attempting to apply them to anything that contained the fragment after the wildcard. This causes error if the hostname doesn't match the wildcard.

Examples:

*.domain.com being applied to domain.com (*. doesn't apply to naked domain)

*.example.com being applied to example.com.hosted.at.host.com (due to Contains() rather than EndsWith())