-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
[python] Check version of cryptography module #14512
Conversation
We have had multiple issues with Ubuntu 16.04 using an outdated version of the Python cryptography module that causes strange SSL behavior. Example for this is not being able to connect to SSL sites. This commit introduces a check on initialization of the interpreter to make sure that we use a compatible version. See also: pyca/pyopenssl#542 (comment) https://forum.kodi.tv/showthread.php?tid=335786
52e5158
to
557faa5
Compare
I don't think that failing to initialize python because of this is a good idea. |
What's the alternative really? It reproducibly breaks SSL (for some users at least?), meaning that even core functionality (such as installing add-ons) will not be available. |
can we just log and throw up a gui error? |
Yes, but then we probably have to go about it differently - we'd need to do the check once at startup, or the user will get spammed all the time. I put it where it is now because there the interpreter is already initialized for sure. Any suggestions where we could place it otherwise? Or save a flag to only warn once? Is it OK to warn the user once at startup? And do you mean like a toast-style notification or a full message box? |
@notspiff Do you have a suggestion how we could easily show a message box at startup? To use |
maybe in the version check addon? https://github.com/xbmc/xbmc/tree/master/addons/service.xbmc.versioncheck although it can be disabled, at least on a fresh install, it should be enabled. |
Although it's called versioncheck, it's doing something completely different (check Kodi version). I'm not sure whether putting that check in there alongside would be a good idea. |
I'm fine with adding it |
Superseded by XBMC-Addons/service.xbmc.versioncheck#18 |
We have had multiple issues with Ubuntu 16.04 using an outdated version
of the Python cryptography module that causes strange SSL behavior.
Example for this is not being able to connect to SSL sites.
This commit introduces a check on initialization of the interpreter
to make sure that we use a compatible version.
See also:
pyca/pyopenssl#542 (comment)
https://forum.kodi.tv/showthread.php?tid=335786
I just put the check inside the interpreter initialization - not sure if it's the most appropriate place? Also I don't have much experience with Python so please check.
How Has This Been Tested?
Build/Run on Linux x64
Screenshots (if appropriate):
Types of change