mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 04:57:54 +00:00
Raise Python version requirement to 2.4.4 for non-UCS-2 builds, to avoid a critical Python security bug.
This commit is contained in:
parent
68d292a968
commit
529add7774
11
NEWS
11
NEWS
@ -18,8 +18,15 @@ instance UTF-8. In such case, you'll need to fix your system with tools such
|
||||
as 'convmv' before using Tahoe CLI.
|
||||
|
||||
All CLI commands have been improved to support non-ASCII parameters such as
|
||||
filenames and aliases on all supported Operating Systems except Windows as of
|
||||
now.
|
||||
filenames and aliases on all supported Operating Systems.
|
||||
|
||||
** dependency updates
|
||||
|
||||
no python-2.4.2 or 2.4.3 (2.4.4 is ok)
|
||||
pycrypto-2.0.1
|
||||
pyasn1-0.0.8a
|
||||
mock
|
||||
|
||||
|
||||
* Release 1.6.1 (2010-02-27)
|
||||
|
||||
|
@ -65,18 +65,19 @@ if sys.version_info < (2, 5):
|
||||
if hasattr(sys, 'frozen'): # for py2exe
|
||||
install_requires=[]
|
||||
|
||||
def require_python_2_with_working_base64():
|
||||
def require_python_version():
|
||||
import sys
|
||||
if sys.version_info[0] != 2:
|
||||
raise NotImplementedError("Tahoe-LAFS current requires Python v2.4.2 or greater (but less than v3), not %r" % (sys.version_info,))
|
||||
|
||||
# make sure we have a working base64.b32decode. The one in
|
||||
# python2.4.[01] was broken.
|
||||
nodeid_b32 = 't5g7egomnnktbpydbuijt6zgtmw4oqi5'
|
||||
import base64
|
||||
nodeid = base64.b32decode(nodeid_b32.upper())
|
||||
if nodeid != "\x9fM\xf2\x19\xcckU0\xbf\x03\r\x10\x99\xfb&\x9b-\xc7A\x1d":
|
||||
raise NotImplementedError("There is a bug in this base64 module: %r. This was a known issue in Python v2.4.0 and v2.4.1 (http://bugs.python.org/issue1171487 ). Tahoe-LAFS current requires Python v2.4.2 or greater (but less than v3). The current Python version is %r" % (base64, sys.version_info,))
|
||||
# we require 2.4.4 on non-UCS-2 builds to avoid <http://www.python.org/news/security/PSF-2006-001/>
|
||||
# we require at least 2.4.2 in any case to avoid a bug in the base64 module: <http://bugs.python.org/issue1171487>
|
||||
if sys.maxunicode == 65535:
|
||||
if sys.version_info < (2, 4, 2) or sys.version_info[0] > 2:
|
||||
raise NotImplementedError("Tahoe-LAFS current requires Python v2.4.2 or greater for a UCS-2 build (but less than v3), not %r" %
|
||||
(sys.version_info,))
|
||||
else:
|
||||
if sys.version_info < (2, 4, 4) or sys.version_info[0] > 2:
|
||||
raise NotImplementedError("Tahoe-LAFS current requires Python v2.4.4 or greater for a non-UCS-2 build (but less than v3), not %r" %
|
||||
(sys.version_info,))
|
||||
|
||||
def require_auto_deps():
|
||||
"""
|
||||
@ -86,7 +87,7 @@ def require_auto_deps():
|
||||
of these packages and gets an ImportError. This function gets called from
|
||||
src/allmydata/__init__.py .
|
||||
"""
|
||||
require_python_2_with_working_base64()
|
||||
require_python_version()
|
||||
|
||||
import pkg_resources
|
||||
for requirement in install_requires:
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
<h2>Install Python</h2>
|
||||
|
||||
<p>Check if you already have an adequate version of Python installed by running <cite>python -V</cite>. Python v2.4 (v2.4.2 or greater), Python v2.5 or Python v2.6 will work. Python v3 does not work. If you don't have one of these versions of Python installed, then follow the instructions on <a href="http://www.python.org/download/releases/2.5.5/">the Python download page</a> to download and install Python v2.5. Make sure that the path to the installation directory has no spaces in it (e.g. on Windows, do not install Python in the "<tt>Program Files</tt>" directory).</p>
|
||||
<p>Check if you already have an adequate version of Python installed by running <cite>python -V</cite>. Python v2.4 (v2.4.4 or greater), Python v2.5 or Python v2.6 will work. Python v3 does not work. If you don't have one of these versions of Python installed, then follow the instructions on <a href="http://www.python.org/download/releases/2.5.5/">the Python download page</a> to download and install Python v2.5. Make sure that the path to the installation directory has no spaces in it (e.g. on Windows, do not install Python in the "<tt>Program Files</tt>" directory).</p>
|
||||
<p>If you are on Windows, you now must manually install the pywin32 package from <a href="http://sourceforge.net/projects/pywin32/files/">the pywin32 site</a> before getting Tahoe-LAFS. Make sure to get the correct file for the version of Python you are using — e.g. ending in "py2.5.exe" for Python 2.5. If using 64-bit Windows, the file should have "win-amd64" in its name.</p>
|
||||
|
||||
<h2>Get Tahoe-LAFS</h2>
|
||||
|
Loading…
Reference in New Issue
Block a user