Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hack: ignore TLS hostname verification for spotifycdn.com #741

Closed
wants to merge 1 commit into from

Conversation

skeller
Copy link

@skeller skeller commented Oct 20, 2023

Spotify seems to have misconfigured some of their hosts or TLS certs:

javax.net.ssl.SSLPeerUnverifiedException: Hostname audio4-gm-fb.spotifycdn.com not verified:
certificate: sha256/mikb4l8fq5rYJv+AdSiChROLrTKpCEENcVFH4engaDw=
DN: CN=audio-gm-off.spotifycdn.com
subjectAltNames: [audio-gm-off.spotifycdn.com]

This patch ignores the host / subdomain part if both the cert and the host we want to connect to end in spotifycdn.com.
This is a hack for misconfigured servers, but security implications should be close to zero.

Ignore subdomains / hostpart name for everything under spotifycdn.com
as those are (sometimes?) misconfigured.
The cert must be for *.spotifycdn.com and the requested host must
also be *.spotifycdn.com
@skeller skeller force-pushed the ignore_spotifycdn_subdoms branch from 05c6d95 to 3cc57b2 Compare October 21, 2023 09:20
@tagdara
Copy link
Contributor

tagdara commented Oct 25, 2023

I've been testing this out today and while it prevents the cert failure, it seems that the chunk is often not available on the server name provided and throws a 404.

We're really talking about audio4-gm-fb.spotifycdn.com which has been using the audio-gm-off.spotifycdn.com certificate, so this problem is possibly a little deeper in the spotify ecosystem.

@devgianlu
Copy link
Member

I think #779 is better solution, disable certificate verification is generally not a good idea and it seems to be broken anyways.

@devgianlu devgianlu closed this Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants