Skip to content

ssl: fix NoMethodError on SAN dNSName with an empty label - #1129

Merged
rhenium merged 1 commit into
ruby:masterfrom
rhenium:ky/ssl-verify-hostname-bad-wildcard
Oct 24, 2026
Merged

rhenium merged 1 commit into
ruby:masterfrom
rhenium:ky/ssl-verify-hostname-bad-wildcard

Conversation

@rhenium

@rhenium rhenium commented Oct 24, 2026

Copy link
Copy Markdown
Member

Handle the empty label as a literal string.

OpenSSL::SSL::SSLSocket#post_connection_check can raise NoMethodError when the server certificate contains a malformed subjectAltName extension with a dNSName that starts with ".", such as ".example.com".

Reported by 4l1ve on HackerOne.

Handle the empty label as a literal string.

OpenSSL::SSL::SSLSocket#post_connection_check can raise NoMethodError
when the server certificate contains a malformed subjectAltName
extension with a dNSName that starts with ".", such as ".example.com".

Reported by 4l1ve on HackerOne.
@rhenium
rhenium merged commit ac3a0b7 into ruby:master Oct 24, 2026
47 of 48 checks passed
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.

1 participant