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

SSL: WRONG_VERSION_NUMBER #265

Open
rac021 opened this issue Feb 22, 2024 · 2 comments
Open

SSL: WRONG_VERSION_NUMBER #265

rac021 opened this issue Feb 22, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@rac021
Copy link

rac021 commented Feb 22, 2024

Hi,

I'm trying to enable allow_self_approval, but I'm facing this error :

20:36:49.279 [ConfigProxy] debug: PROXY WEB /hub/signup to http://jupyterhub:8081
[E 2024-02-22 20:36:49.526 JupyterHub nativeauthenticator:357] [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1007)

In the following, my configuration :

c.NativeAuthenticator.allow_self_approval_for = '[^@]+@hotmail\.com$'
    c.NativeAuthenticator.secret_key = "your-arbitrary-key-your-arbitrary-key-your-arbitrary-key-your"
    c.NativeAuthenticator.self_approval_email = (
        "user.one@comp.fr",
        "approval_link",
        "email body including https://hotmail.com{approval_url}",
    )
    c.NativeAuthenticator.self_approval_server = {
        'url': 'smtp.comp.fr',
        'usr': 'user.one',
        'pwd': '123456789'
    }
@rac021 rac021 added the bug Something isn't working label Feb 22, 2024
@rac021
Copy link
Author

rac021 commented Feb 22, 2024

How can we use STARTTLS instead of SSL ?

@rac021
Copy link
Author

rac021 commented Feb 23, 2024

To fix the issue, I have modified the code :

s = smtplib.SMTP_SSL(self.self_approval_server["url"])
s.login( self.self_approval_server["usr"], self.self_approval_server["pwd"]  )

To :

smtplib.SMTP(self.self_approval_server["url", 587 ]
s.ehlo()
s.starttls()  
s.ehlo()
s.login( self.self_approval_server["usr"], self.self_approval_server["pwd"] )

Maybe this should be integrated into the configuration ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant