1
Fork 0
Commit Graph

81109 Commits

Author SHA1 Message Date
Nedko Arnaudov b60bfde0a6 gitignore generated files 2023-11-14 01:10:30 +02:00
Nedko Arnaudov 9e7621e434 remove generated files 2023-11-13 22:05:26 +02:00
Nedko Arnaudov 9cfb3944b0 Update generated files 2023-11-11 23:35:27 +02:00
Nedko Arnaudov d1c1dcb6d3 Favour prefix over compiler paths 2023-11-11 23:17:34 +02:00
Nedko Arnaudov 00118b35c4 Revert "Make module byte-compilation non-fatal"
This reverts commit ad0d6c1287.
2023-11-11 21:04:18 +02:00
Nedko Arnaudov bda0d6c989 setup.py: Use sys.prefix for inc_dirs and lib_dirs 2023-11-11 20:31:39 +02:00
Nedko Arnaudov a2b193afe8 Revert "Gentoo libdir"
This reverts commit 7002d9fc4a.
2023-11-11 20:27:07 +02:00
Sam James f6e6fcd199 Fix -Wimplicit-int, -Wimplicit-function-declaration
These warnings became fatal by default in Clang 16.

Most of this has since been fixed upstream but
https://github.com/python/cpython/pull/99085 is pending.

Signed-off-by: Sam James <sam@gentoo.org>
2023-11-11 20:24:45 +02:00
Michał Górny 6ef2c3984a ssl: Hard-disable SSLv3 to avoid automagic deps
Bug: https://bugs.gentoo.org/767886
2023-11-11 20:24:20 +02:00
Mike Gilbert a2a5b27f69 test.support.unlink: ignore EACCES
Resolves test errors when running in the Gentoo sandbox environment.

Bug: https://bugs.gentoo.org/679628
2023-11-11 20:24:11 +02:00
Michał Górny 3a9d955554 Force using system libffi 2023-11-11 20:24:07 +02:00
Michał Górny 97411d9f11 Use specific -Werror for cross-compile tests
https://bugs.python.org/issue25397
2023-11-11 20:24:02 +02:00
Michał Górny e5be1e5432 Use ncurses to find pkg-config 2023-11-11 20:23:57 +02:00
Michał Górny ad0d6c1287 Make module byte-compilation non-fatal 2023-11-11 20:23:50 +02:00
Mike Gilbert 390bd0e008 Disable nis 2023-11-11 20:23:43 +02:00
Mike Gilbert 0b595b2b4b use_pyxml 2023-11-11 20:23:36 +02:00
Mike Gilbert 2cc385ad81 ARM OABI
https://bugs.gentoo.org/show_bug.cgi?id=266703
https://bugs.python.org/issue1762561
2023-11-11 20:23:29 +02:00
Mike Gilbert 98c48f7370 Turkish locale 2023-11-11 20:23:23 +02:00
Mike Gilbert e506291776 distutils C++
https://bugs.python.org/issue1222585
2023-11-11 20:23:18 +02:00
Mike Gilbert a7aec85049 Regenerate platform-specific modules
https://bugs.python.org/issue12619
2023-11-11 20:23:12 +02:00
Mike Gilbert 7f2b5d2615 sqlite loadable extensions
https://bugs.gentoo.org/show_bug.cgi?id=335505
https://bugs.python.org/issue10268
2023-11-11 20:23:08 +02:00
Mike Gilbert 1b4b1ec376 Non-zero exit status on failure
https://bugs.gentoo.org/show_bug.cgi?id=281968
https://bugs.python.org/issue6731
2023-11-11 20:23:02 +02:00
Mike Gilbert 7002d9fc4a Gentoo libdir 2023-11-11 20:22:58 +02:00
Mike Gilbert 6ccd53c639 Disable modules and SSL 2023-11-11 20:22:38 +02:00
Mike Gilbert 10879e3900 Install libpythonX.Y.a in /usr/lib instead of /usr/lib/pythonX.Y/config.
https://bugs.gentoo.org/show_bug.cgi?id=252372
https://bugs.python.org/issue6103
2023-11-11 20:22:25 +02:00
Michał Górny 6a01d52879 bpo-46756: Fix authorization check in urllib.request (GH-31353)
Fix a bug in urllib.request.HTTPPasswordMgr.find_user_password() and
urllib.request.HTTPPasswordMgrWithPriorAuth.is_authenticated() which
allowed to bypass authorization. For example, access to URI "example.org/foobar"
was allowed if the user was authorized for URI "example.org/foo".

(rebased for 2.7 by Michał Górny)
2023-11-11 20:21:31 +02:00
Sebastian Pipping 2fd8ca4cec bpo-46811: Make test suite support Expat >=2.4.5 (GH-31453)
Curly brackets were never allowed in namespace URIs
according to RFC 3986, and so-called namespace-validating
XML parsers have the right to reject them a invalid URIs.

libexpat >=2.4.5 has become strcter in that regard due to
related security issues; with ET.XML instantiating a
namespace-aware parser under the hood, this test has no
future in CPython.

References:
- https://datatracker.ietf.org/doc/html/rfc3968
- https://www.w3.org/TR/xml-names/

Also, test_minidom.py: Support Expat >=2.4.5

(rebased for 2.7.18 by Michał Górny)
2023-11-11 20:21:22 +02:00
Michał Górny 678068ccdb Fix accidentally leaving one sub-test commented out 2023-11-11 20:21:01 +02:00
Miss Islington (bot) 6b22388edb bpo-42278: Use tempfile.TemporaryDirectory rather than tempfile.mktemp in pydoc (GH-23200) (GH-28026)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit c9227df5a9)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>

(updated for Python 2.7 by Michał Górny)
2023-11-11 20:20:56 +02:00
Miss Islington (bot) 0781fdfd20 bpo-43124: Fix smtplib multiple CRLF injection (GH-25987) (GH-28038)
Co-authored-by: Miguel Brito <5544985+miguendes@users.noreply.github.com>

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 0897253f42)

(updated for 2.7 by Michał Górny)
2023-11-11 20:20:49 +02:00
Michał Górny cfb547a330 Backport bpo-44022: Fix http client infinite line reading (DoS) after a HTTP 100 Continue (GH-25916)
Backport the fix from the following commit:

    commit 47895e31b6
    Author: Gen Xu <xgbarry@gmail.com>
    Date:   2021-05-06 00:42:41 +0200

        bpo-44022: Fix http client infinite line reading (DoS) after a HTTP 100 Continue (GH-25916)

        Fixes http.client potential denial of service where it could get stuck reading lines from a malicious server after a 100 Continue response.

        Co-authored-by: Gregory P. Smith <greg@krypto.org>

Instead of reusing the header reading code, I have just added explicit
counter to avoid having to refactor the old code.

Plus the improved test from:

    commit e60ab843cb
    Author: Gregory P. Smith <greg@krypto.org>
    Date:   2021-06-03 05:43:38 +0200

        bpo-44022: Improve the regression test. (GH-26503)

        It wasn't actually detecting the regression due to the
        assertion being too lenient.
2023-11-11 20:20:42 +02:00
Miss Islington (bot) 0dde449d23 bpo-43882 - urllib.parse should sanitize urls containing ASCII newline and tabs. (GH-25595) (GH-25725)
* bpo-43882 - urllib.parse should sanitize urls containing ASCII newline and tabs. (GH-25595)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 76cd81d603)
Co-authored-by: Senthil Kumaran <skumaran@gatech.edu>
(backported to Python 2.7 by Michał Górny)
2023-11-11 20:20:33 +02:00
Miss Islington (bot) 57b966b72a bpo-43075: Fix ReDoS in urllib AbstractBasicAuthHandler (GH-24391)
Fix Regular Expression Denial of Service (ReDoS) vulnerability in
urllib.request.AbstractBasicAuthHandler. The ReDoS-vulnerable regex
has quadratic worst-case complexity and it allows cause a denial of
service when identifying crafted invalid RFCs. This ReDoS issue is on
the client side and needs remote attackers to control the HTTP server.
(cherry picked from commit 7215d1ae25)

Co-authored-by: Yeting Li <liyt@ios.ac.cn>
(backported to Python 2.7 by Michał Górny)
2023-11-11 20:20:08 +02:00
Miss Islington (bot) fd5f6ec2d0 bpo-43285 Make ftplib not trust the PASV response. (GH-24838) (GH-24881) (GH-24882)
The IPv4 address value returned from the server in response to the PASV command
should not be trusted.  This prevents a malicious FTP server from using the
response to probe IPv4 address and port combinations on the client network.

Instead of using the returned address, we use the IP address we're
already connected to.  This is the strategy other ftp clients adopted,
and matches the only strategy available for the modern IPv6 EPSV command
where the server response must return a port number and nothing else.

For the rare user who _wants_ this ugly behavior, set a `trust_server_pasv_ipv4_address`
attribute on your `ftplib.FTP` instance to True..
(cherry picked from commit 0ab152c6b5)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
(cherry picked from commit 664d1d1627)

Rebased for Python 2.7 by Michał Górny <mgorny@gentoo.org>
2023-11-11 20:19:51 +02:00
Michał Górny 49954ce987 py2-ize the CJK codec test
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2023-11-11 20:19:38 +02:00
Senthil Kumaran e2205253f7 bpo-42967: only use '&' as a query string separator (GH-24297) (GH-24532)
bpo-42967: [security] Address a web cache-poisoning issue reported in
urllib.parse.parse_qsl().

urllib.parse will only us "&" as query string separator by default
instead of both ";" and "&" as allowed in earlier versions. An optional
argument seperator with default value "&" is added to specify the
separator.

Co-authored-by: Éric Araujo <merwok@netwok.org>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Adam Goldschmidt <adamgold7@gmail.com>

Rebased for Python 2.7 by Michał Górny
2023-11-11 20:19:22 +02:00
Benjamin Peterson 2f19d0eb93 closes bpo-42938: Replace snprintf with Python unicode formatting in ctypes param reprs. (GH-24250)
(cherry picked from commit 916610ef90)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
Rebased for Python 2.7 by Michał Górny <mgorny@gentoo.org>
2023-11-11 20:19:13 +02:00
Miss Islington (bot) 9cafec5341 bpo-40791: Make compare_digest more constant-time. (GH-23438)
The existing volatile `left`/`right` pointers guarantee that the reads will all occur, but does not guarantee that they will be _used_. So a compiler can still short-circuit the loop, saving e.g. the overhead of doing the xors and especially the overhead of the data dependency between `result` and the reads. That would change performance depending on where the first unequal byte occurs. This change removes that optimization.

(This is change GH-1 from https://bugs.python.org/issue40791 .)
(cherry picked from commit 31729366e2)

Co-authored-by: Devin Jeanpierre <jeanpierreda@google.com>

Rebased for Python 2.7 by Michał Górny <mgorny@gentoo.org>
2023-11-11 20:19:03 +02:00
Miss Skeleton (bot) a281fb4145 bpo-41944: No longer call eval() on content received via HTTP in the CJK codec tests (GH-22566) (GH-22579)
(cherry picked from commit 2ef5caa58f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

Rebased for Python 2.7 by Michał Górny <mgorny@gentoo.org>
2023-11-11 20:18:54 +02:00
Miss Skeleton (bot) 03e02db693 bpo-42051: Reject XML entity declarations in plist files (GH-22760) (GH-22801) (GH-22804)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
(cherry picked from commit e512bc799e)

Co-authored-by: Ned Deily <nad@python.org>

Rebased for Python 2.7 by Michał Górny <mgorny@gentoo.org>
2023-11-11 20:18:45 +02:00
Michał Górny 1c0098e87c bpo-39603: Prevent header injection in http methods (GH-18485) (GH-21539)
reject control chars in http method in http.client.putrequest to prevent http header injection
(cherry picked from commit 8ca8a2e8fb)

Co-authored-by: AMIR <31338382+amiremohamadi@users.noreply.github.com>

[rebased for py2.7]
2023-11-11 20:18:39 +02:00
Michał Górny 417ee3ca0d bpo-39503: CVE-2020-8492: Fix AbstractBasicAuthHandler (GH-18284) (GH-19304)
The AbstractBasicAuthHandler class of the urllib.request module uses
an inefficient regular expression which can be exploited by an
attacker to cause a denial of service. Fix the regex to prevent the
catastrophic backtracking. Vulnerability reported by Ben Caller
and Matt Schwager.

AbstractBasicAuthHandler of urllib.request now parses all
WWW-Authenticate HTTP headers and accepts multiple challenges per
header: use the realm of the first Basic challenge.

Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 0b297d4ff1)

[rebased for py2.7]
2023-11-11 20:18:32 +02:00
Rishi 6934582568 bpo-39017: Avoid infinite loop in the tarfile module (GH-21454)
Avoid infinite loop when reading specially crafted TAR files using the tarfile module
(CVE-2019-20907).

[stripped test to avoid binary patch]
2023-11-11 20:17:51 +02:00
Benjamin Peterson 8d21aa21f2 Add empty 2.7.18 NEWS file. 2020-04-19 16:13:39 -05:00
Benjamin Peterson 8323757381 Bump version to 2.7.18. 2020-04-19 16:12:51 -05:00
Benjamin Peterson f2f950e3d0
Remove incorrect comma. (GH-19604) 2020-04-19 09:08:18 -05:00
Leonard Richardson 0fc82e9587
[2.7] Doc: Add an optional obsolete header. (GH-19229) 2020-04-18 17:55:10 -05:00
Benjamin Peterson 7a41638b5b Bump version to 2.7.18rc1. 2020-04-04 11:54:14 -05:00
Benjamin Peterson c6bfd0443e Make 2.7.18rc1 release notes. 2020-04-04 11:53:42 -05:00
Ned Deily 8a0a50084f
Update macOS installer build for 2.7.18 end-of-life. (GH-19352) 2020-04-03 20:34:39 -04:00