[Bug 2084715] Re: recent date test causes new builds to fail
Launchpad Bug Tracker
2084715 at bugs.launchpad.net
Tue Oct 29 15:24:29 UTC 2024
This bug was fixed in the package python-urllib3 - 2.0.7-1ubuntu0.1
---------------
python-urllib3 (2.0.7-1ubuntu0.1) noble-security; urgency=medium
* SECURITY UPDATE: The Proxy-Authorization header is not correctly stripped
when redirecting to a different host.
- debian/patches/CVE-2024-37891.patch: Add "Proxy-Authorization" to
DEFAULT_REMOVE_HEADERS_ON_REDIRECT in src/urllib3/util/retry.py. Add
header to tests.
- CVE-2024-37891
* Skip failing test causing build-time failures: (LP: #2084715)
- debian/rules: Add "not test_recent_date" to PYBUILD_TEST_ARGS.
-- Hlib Korzhynskyy <hlib.korzhynskyy at canonical.com> Wed, 16 Oct 2024
15:20:56 -0230
** Changed in: python-urllib3 (Ubuntu)
Status: In Progress => Fix Released
** CVE added: https://cve.mitre.org/cgi-bin/cvename.cgi?name=2024-37891
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-urllib3 in Ubuntu.
https://bugs.launchpad.net/bugs/2084715
Title:
recent date test causes new builds to fail
Status in python-urllib3 package in Ubuntu:
Fix Released
Bug description:
When attempting to build python-urllib3 for Ubuntu LTS 24.04, the test
called "test_recent_date" fails, causing the build to fail.
AssertionError: assert datetime.date(2022, 1, 1) >
datetime.date(2022, 10, 17)
The test involves getting today's date minus a delta of 2 years and
checking against "RECENT_DATE" variable, which is set to 1st of
January 2022. As of the 1st of January 2024 all new builds fail on
Ubuntu LTS 24.04.
Full Trace:
_______________________ TestConnection.test_recent_date
________________________
self = <test.test_connection.TestConnection object at 0x7cf9c3ed4320>
def test_recent_date(self) -> None:
# This test is to make sure that the RECENT_DATE value
# doesn't get too far behind what the current date is.
# When this test fails update urllib3.connection.RECENT_DATE
# according to the rules defined in that file.
two_years = datetime.timedelta(days=365 * 2)
> assert RECENT_DATE > (datetime.datetime.today() - two_years).date()
E AssertionError: assert datetime.date(2022, 1, 1) > datetime.date(2022, 10, 17)
E + where datetime.date(2022, 10, 17) = <built-in method date of datetime.datetime object at 0x7cf9c32c0c60>()
E + where <built-in method date of datetime.datetime object at 0x7cf9c32c0c60> = (datetime.datetime(2024, 10, 16, 15, 31, 59, 740879) - datetime.timedelta(days=730)).date
E + where datetime.datetime(2024, 10, 16, 15, 31, 59, 740879) = <built-in method today of type object at 0xa4fd20>()
E + where <built-in method today of type object at 0xa4fd20> = <class 'datetime.datetime'>.today
E + where <class 'datetime.datetime'> = datetime.datetime
test/test_connection.py:206: AssertionError
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-urllib3/+bug/2084715/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list