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

🥅 Re-raise #starttls error from receiver thread (backport #395 to v0.4) #403

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

nevans
Copy link
Collaborator

@nevans nevans commented Feb 7, 2025

Backports #395 to v0.4-stable.

When start_tls_session raises an exception, that's caught in the receiver thread, but not re-raised. Fortunately, @sock will now be a permanently broken SSLSocket, so I don't think this can lead to accidentally using an insecure connection.

Even so, #starttls should disconnect the socket and re-raise the error immediately.

Failing test case was provided by @rhenium in #394.

Fixes #394.

When `start_tls_session` raises an exception, that's caught in the
receiver thread, but not re-raised.  Fortunately, `@sock` will now be
a permanently broken SSLSocket, so I don't think this can lead to
accidentally using an insecure connection.

Even so, `#starttls` should disconnect the socket and re-raise the error
immediately.

Failing test case was provided by @rhenium in #394.

Co-authored-by: Kazuki Yamaguchi <[email protected]>
@nevans nevans added bug Something isn't working backport This issue or PR is for a stable release branch labels Feb 7, 2025
@nevans nevans merged commit 3023888 into v0.4-stable Feb 7, 2025
30 checks passed
@nevans nevans deleted the backport-0.4-startssl-exception branch February 7, 2025 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport This issue or PR is for a stable release branch bug Something isn't working
Development

Successfully merging this pull request may close these issues.

1 participant