1
0
forked from pool/python-Django

add bugzilla entries for the CVEs

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:django/python-Django?expand=0&rev=174
This commit is contained in:
Markéta Machová 2024-08-08 10:33:49 +00:00 committed by Git OBS Bridge
commit 67729811db
14 changed files with 3305 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,67 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
This file contains MD5, SHA1, and SHA256 checksums for the source-code
tarball and wheel files of Django 4.2.13, released May 7, 2024.
To use this file, you will need a working install of PGP or other
compatible public-key encryption software. You will also need to have
the Django release manager's public key in your keyring. This key has
the ID ``2EE82A8D9470983E`` and can be imported from the MIT
keyserver, for example, if using the open-source GNU Privacy Guard
implementation of PGP:
gpg --keyserver pgp.mit.edu --recv-key 2EE82A8D9470983E
or via the GitHub API:
curl https://github.com/nessita.gpg | gpg --import -
Once the key is imported, verify this file:
gpg --verify Django-4.2.13.checksum.txt
Once you have verified this file, you can use normal MD5, SHA1, or SHA256
checksumming applications to generate the checksums of the Django
package and compare them to the checksums listed below.
Release packages
================
https://www.djangoproject.com/m/releases/4.2/Django-4.2.13-py3-none-any.whl
https://www.djangoproject.com/m/releases/4.2/Django-4.2.13.tar.gz
MD5 checksums
=============
449eeffe35a7a748bf9acc4169ea7492 Django-4.2.13-py3-none-any.whl
a243a2c1e7c0752947d16d4ffae30376 Django-4.2.13.tar.gz
SHA1 checksums
==============
75a19218f248f0010685b471d1be86cad7602872 Django-4.2.13-py3-none-any.whl
56373bedaef33ee29b2d240b6b06ebe2e1e2fc58 Django-4.2.13.tar.gz
SHA256 checksums
================
a17fcba2aad3fc7d46fdb23215095dbbd64e6174bf4589171e732b18b07e426a Django-4.2.13-py3-none-any.whl
837e3cf1f6c31347a1396a3f6b65688f2b4bb4a11c580dcb628b5afe527b68a5 Django-4.2.13.tar.gz
-----BEGIN PGP SIGNATURE-----
iQJcBAEBCABGFiEEW1sboQ2FrHxcduOPLugqjZRwmD4FAmY6YWsoHDEyNDMwNCtu
ZXNzaXRhQHVzZXJzLm5vcmVwbHkuZ2l0aHViLmNvbQAKCRAu6CqNlHCYPtEKD/9S
rZ+yadh7sQGszWtJEIZZS/YBQRcNyM+26aUkpk+3XT1SUDUs0whtX6U/P3tP+h+P
0vIk0wxTc3RhRCp8WETYulekRhPFc5HJFwlD/vh9AkEyDKW8QFuV+IBswvlfG/wK
D+QcuERl31Y1qcrCeFCM+XIRxGR9lQ0DuoCa1FuPl0bvAlNDOfNSmp4OzcPzGm4a
wE9wtsHqKkL8BAc836JIXHj5wdQK+HOkOv30ZcUU+nD3Lp5N44ESzzSe7IOutN02
PBAixmwMf6EqjHC7JN49EwiPbEDTmg5HNj7LBM1Teqp5Hms11xGMfzxsh3AbEtoT
xeqZjrrcwoVf+wASVCKCv33Gfka45Z5X5f5G2O8//yJdLogwr6994rJ1MB7k18Yd
ObOl17pUctdrNKWuESJXz3l2c1DPbFQNKHiqI66fFm4L/fLMubMzkDlWzWH1jqSo
8tbSH9ATjEp/aLYKuGgr1gdazl4YbpiTkEjzFXYGmyjF7hPLT7xH2rrGCT4J7Bjc
TGnZGXdl4yaGcC8Q0Ma5ybMv3GgEsaa1wRnbNv5nQyNXIWrt9rcMfBDwcaSkq6NR
d7WpYUy5JT0IbR1SAazMY+NjUy+vzq26KkcUcbkoOng3guba0uPuoSphWM607MzK
UVab1KcJwNOC7/Di4Ul9vlh7dLMVg5yG+o7kFEJU/A==
=o/kY
-----END PGP SIGNATURE-----

3
Django-4.2.13.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:837e3cf1f6c31347a1396a3f6b65688f2b4bb4a11c580dcb628b5afe527b68a5
size 10430886

67
Django-5.0.7.checksum.txt Normal file
View File

@ -0,0 +1,67 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
This file contains MD5, SHA1, and SHA256 checksums for the source-code
tarball and wheel files of Django 5.0.7, released July 9, 2024.
To use this file, you will need a working install of PGP or other
compatible public-key encryption software. You will also need to have
the Django release manager's public key in your keyring. This key has
the ID ``2EE82A8D9470983E`` and can be imported from the MIT
keyserver, for example, if using the open-source GNU Privacy Guard
implementation of PGP:
gpg --keyserver pgp.mit.edu --recv-key 2EE82A8D9470983E
or via the GitHub API:
curl https://github.com/nessita.gpg | gpg --import -
Once the key is imported, verify this file:
gpg --verify Django-5.0.7.checksum.txt
Once you have verified this file, you can use normal MD5, SHA1, or SHA256
checksumming applications to generate the checksums of the Django
package and compare them to the checksums listed below.
Release packages
================
https://www.djangoproject.com/m/releases/5.0/Django-5.0.7.tar.gz
https://www.djangoproject.com/m/releases/5.0/Django-5.0.7-py3-none-any.whl
MD5 checksums
=============
454d23ea901892fd544541f4a1a33a3e Django-5.0.7.tar.gz
c687175397b8d6d98b8e0e35e6f142fb Django-5.0.7-py3-none-any.whl
SHA1 checksums
==============
ed070e21b5bf0b188104338a3b8a495b9d59593d Django-5.0.7.tar.gz
4aecb9aeab348f003c32952906eef7556a5be54b Django-5.0.7-py3-none-any.whl
SHA256 checksums
================
bd4505cae0b9bd642313e8fb71810893df5dc2ffcacaa67a33af2d5cd61888f2 Django-5.0.7.tar.gz
f216510ace3de5de01329463a315a629f33480e893a9024fc93d8c32c22913da Django-5.0.7-py3-none-any.whl
-----BEGIN PGP SIGNATURE-----
iQJcBAEBCABGFiEEW1sboQ2FrHxcduOPLugqjZRwmD4FAmaNPRgoHDEyNDMwNCtu
ZXNzaXRhQHVzZXJzLm5vcmVwbHkuZ2l0aHViLmNvbQAKCRAu6CqNlHCYPgnUD/47
sPedXK17iCelw70BRY7EqWxwVwSbTxKcnw14y2qejS923MlnEEraeOll2HbCqOmL
+O3coVJsTc9GAMrQLyip8sHCwb4SSCWmwRqQZbTdNRrZOWfCPRLsbVccEabdwTNC
7YDyDc+3FQhHIszNI0zkJ1H3G7280euwIrMIhnCbwH1PC/hqAwdlhf1+nc4BiIMg
dz/Bg65abruY/6LM0btMP72avHrM0BRiRs5kOYn7+xgh1cqnI64RHROgrymK7JkT
LxoZDhWvDv68IvyNWEuLU4yDXnv/3ZglhwUA8q+leMqtURwBWs8UMnLhHhR52kie
okrK6eBkYeHls3vMGOTKxe7nJHhfEjl6V9XJShIdU1ir+/iCeaRMzYjpr4H5591H
TMs8Hgm27Wt7U/OT5EsF+vIpLaAR9AnZfNfB1eYU34BUAloZSQCxz+Y65LCN5wKk
jfaG7phOiO33NJMUxhfemjwJIJymw7uZnuRQJ8KUMbr9Q/iCVWsMG+QXhJs96KRO
y1SYVgPgU5Jll9VN/H2WJCj9I1YOVZPDVAbMcB+hKklw6ZhZx2fxgxLO/3/REQJs
iBJ1ETPdCHct5HJyAoBD++NCeioUKd5pXxqMvtuNH7winRC9NMGw4XX1CbpBBB+1
y1mkGxw+QvBh4rivA6TSQQwTDQXAnoT7ida+Ye2FVw==
=GcbG
-----END PGP SIGNATURE-----

3
Django-5.0.7.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bd4505cae0b9bd642313e8fb71810893df5dc2ffcacaa67a33af2d5cd61888f2
size 10642686

65
Django-5.0.8.checksum.txt Normal file
View File

@ -0,0 +1,65 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
This file contains MD5, SHA1, and SHA256 checksums for the source-code
tarball and wheel files of Django 5.0.8, released August 6, 2024.
To use this file, you will need a working install of PGP or other
compatible public-key encryption software. You will also need to have
the Django release manager's public key in your keyring. This key has
the ID ``3955B19851EA96EF`` and can be imported from the MIT
keyserver, for example, if using the open-source GNU Privacy Guard
implementation of PGP:
gpg --keyserver pgp.mit.edu --recv-key 3955B19851EA96EF
or via the GitHub API:
curl https://github.com/sarahboyce.gpg | gpg --import -
Once the key is imported, verify this file:
gpg --verify Django-5.0.8.checksum.txt
Once you have verified this file, you can use normal MD5, SHA1, or SHA256
checksumming applications to generate the checksums of the Django
package and compare them to the checksums listed below.
Release packages
================
https://www.djangoproject.com/m/releases/5.0/Django-5.0.8.tar.gz
https://www.djangoproject.com/m/releases/5.0/Django-5.0.8-py3-none-any.whl
MD5 checksums
=============
fb167eef987a98421cad62036868a1ca Django-5.0.8.tar.gz
59c31f54f7e064b9a26152e1d16ac18e Django-5.0.8-py3-none-any.whl
SHA1 checksums
==============
b2ec7cbd6e73f9d2259456e5be86156df4d3933e Django-5.0.8.tar.gz
caa744bb5e668e661e0182a5cc3b9a8c6611f029 Django-5.0.8-py3-none-any.whl
SHA256 checksums
================
ebe859c9da6fead9c9ee6dbfa4943b04f41342f4cea2c4d8c978ef0d10694f2b Django-5.0.8.tar.gz
333a7988f7ca4bc14d360d3d8f6b793704517761ae3813b95432043daec22a45 Django-5.0.8-py3-none-any.whl
-----BEGIN PGP SIGNATURE-----
iQHhBAEBCABLFiEE6xs4DYrFLQArrNMyOVWxmFHqlu8FAmayI3UtHDQyMjk2NTY2
K3NhcmFoYm95Y2VAdXNlcnMubm9yZXBseS5naXRodWIuY29tAAoJEDlVsZhR6pbv
msAL/1MlnPMdwmWoHKujgAsF0amxYRQ6dZ9HJLukm7YLGbXDJxTWK8uzRm8bNYqF
PAVAd/N+x7es7d9lhd7XnA9r3npHj03IfvO9Q7f2qMD0YLdUDWD/0ALMhs62VBoc
8eE6npty+t9SS+p0JaqdRmzB95EDIY52ql9Z62fBcYyCQqAQYTQRydgYM57h23ha
G6zNQRTbkaCj9nK/ZyahfrmYsyOWkPWb4LBFJFOV3gbPVHNLPnGjYbcQ8Fh8qMF+
9eGXHETm5bQRsXsaXgIrCCCfyB5Z7f/Ksd3Pkm9uYB1iTkyhxFPYzcHm4vNPpnx7
85Yzm5E/VXsScN8XuwdwPbGDqwtRG7Ena3XdSvZdur0NwS+A/qVoG0fKPr3avx8k
28/hpV5nBQaeA6L7VvzRanAtlEHqzh1T+zjfIatAhRL5QE7I4EcEQQIObdvKtAUq
ff5ZFJOdeLTYfF7Gx2zm85hJQR9RO+iB92oUqCZmWy5YQU5KVDRq9Rdv+HEFJB9C
oqY5TQ==
=O103
-----END PGP SIGNATURE-----

3
Django-5.0.8.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ebe859c9da6fead9c9ee6dbfa4943b04f41342f4cea2c4d8c978ef0d10694f2b
size 10630791

View File

@ -0,0 +1,25 @@
From 36736edaf595d2bbf1fe881609b2a4c8e3bac68a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Thu, 29 Jun 2023 12:29:21 +0200
Subject: [PATCH] Dirty hack: Remove a failing assert, failure does not seem
critical
---
tests/settings_tests/tests.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/tests/settings_tests/tests.py b/tests/settings_tests/tests.py
index 62cbffb..b7432d3 100644
--- a/tests/settings_tests/tests.py
+++ b/tests/settings_tests/tests.py
@@ -397,7 +397,6 @@ class TestComplexSettingOverride(SimpleTestCase):
with self.assertWarnsMessage(UserWarning, msg) as cm:
with override_settings(TEST_WARN="override"):
self.assertEqual(settings.TEST_WARN, "override")
- self.assertEqual(cm.filename, __file__)
class SecureProxySslHeaderTest(SimpleTestCase):
--
2.40.1

5
python-Django-rpmlintrc Normal file
View File

@ -0,0 +1,5 @@
addFilter("file-not-in-%lang")
# Empty model.py files should be kept around:
addFilter("zero-length")
# Bash completion isn't config:
# addFilter("non-conffile-in-etc /etc/bash_completion.d/django_bash_completion*")

2815
python-Django.changes Normal file

File diff suppressed because it is too large Load Diff

42
python-Django.keyring Normal file
View File

@ -0,0 +1,42 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
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
z+gZLcBuv/NdNg==
=B8gH
-----END PGP PUBLIC KEY BLOCK-----

146
python-Django.spec Normal file
View File

@ -0,0 +1,146 @@
#
# spec file for package python-Django
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define skip_python2 1
%define skip_python36 1
# Selenium and memcached are not operational
%bcond_with selenium
%bcond_with memcached
%{?sle15_python_module_pythons}
Name: python-Django
Version: 5.0.8
Release: 0
Summary: A high-level Python Web framework
License: BSD-3-Clause
URL: https://www.djangoproject.com
Source: https://www.djangoproject.com/m/releases/5.0/Django-%{version}.tar.gz
Source1: https://media.djangoproject.com/pgp/Django-%{version}.checksum.txt
Source2: %{name}.keyring
Source99: python-Django-rpmlintrc
BuildRequires: %{python_module Jinja2 >= 2.9.2}
BuildRequires: %{python_module Pillow >= 6.2.0}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module argon2-cffi >= 19.1.0}
BuildRequires: %{python_module asgiref >= 3.7.0}
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module bcrypt}
BuildRequires: %{python_module docutils}
BuildRequires: %{python_module geoip2}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pytz}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module sqlparse >= 0.3.1}
BuildRequires: %{python_module tblib >= 1.5.0}
BuildRequires: %{pythons}
BuildRequires: fdupes
BuildRequires: gpg2
BuildRequires: python-rpm-macros
Requires: python
Requires: python-Pillow >= 6.2.0
Requires: python-asgiref >= 3.7.0
Requires: python-sqlparse >= 0.3.1
Requires: python-tzdata
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: python-Jinja2 >= 2.9.2
Recommends: python-PyYAML
Recommends: python-argon2-cffi >= 19.1.0
Recommends: python-bcrypt
Recommends: python-geoip2
Recommends: python-pylibmc
Recommends: python-pymemcache
Provides: python-django = %{version}
Obsoletes: python-django < %{version}
Provides: python-South = %{version}
Obsoletes: python-South < %{version}
BuildArch: noarch
%if %{with memcached}
BuildRequires: %{python_module pylibmc}
BuildRequires: %{python_module pymemcache}
%endif
%if %{with selenium}
# python-selenium is supported only on the Intel architecture.
# Additionally chromedriver is only available on x86_64.
%ifarch %{ix86} x86_64
BuildRequires: %{python_module selenium}
BuildRequires: chromedriver
BuildRequires: xvfb-run
%endif
%endif
%python_subpackages
%description
Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
%prep
# The publisher doesn't sign the source tarball, but a signatures file
# containing multiple hashes.
gpg --import %{SOURCE2}
gpg --verify %{SOURCE1}
#
# Verify hashes in that file against source tarball.
echo "`grep -e '^[0-9a-f]\{32\} Django-%{version}.tar.gz' %{SOURCE1} | cut -c1-32` %{SOURCE0}" | md5sum -c
echo "`grep -e '^[0-9a-f]\{40\} Django-%{version}.tar.gz' %{SOURCE1} | cut -c1-40` %{SOURCE0}" | sha1sum -c
echo "`grep -e '^[0-9a-f]\{64\} Django-%{version}.tar.gz' %{SOURCE1} | cut -c1-64` %{SOURCE0}" | sha256sum -c
%autosetup -p1 -n Django-%{version}
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/django-admin
%{python_expand install -D -m 0644 extras/django_bash_completion %{buildroot}%%{_datadir}/bash-completion/completions/django_bash_completion-%{$python_bin_suffix}.sh
# Fix wrong-script-interpreter
sed -i "s|^#!%{_bindir}/env python$|#!%{_bindir}/$python|" \
%{buildroot}%{$python_sitelib}/django/conf/project_template/manage.py-tpl
}
%python_compileall
%{python_expand #
%fdupes %{buildroot}%{$python_sitelib}/django/
%fdupes %{buildroot}%{$python_sitelib}/Django-%{version}-py*.egg-info/
}
%check
export LANG=en_US.UTF8
export PYTHONDONTWRITEBYTECODE=1
%if %{with selenium}
export PATH=%{_libdir}/chromium:$PATH
%python_expand PYTHONPATH=.:%{buildroot}%{$python_sitelib} xvfb-run $python tests/runtests.py -v 2 --selenium=chrome
%else
%python_expand PYTHONPATH=.:%{buildroot}%{$python_sitelib} $python tests/runtests.py -v 2
%endif
%post
%{python_install_alternative django-admin}
%postun
%{python_uninstall_alternative django-admin}
%files %{python_files}
%doc AUTHORS README.rst
%license LICENSE
%python_alternative %{_bindir}/django-admin
%{_datadir}/bash-completion/completions/django_bash_completion-%{python_bin_suffix}.sh
%{python_sitelib}/django
%{python_sitelib}/Django-%{version}-py*.egg-info
%changelog

40
sanitize_address.patch Normal file
View File

@ -0,0 +1,40 @@
From da2f8e8257d1bea4215381684ca4abfcee333c43 Mon Sep 17 00:00:00 2001
From: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Date: Mon, 17 Jul 2023 11:03:36 +0200
Subject: [PATCH] Refs #34118 -- Improved sanitize_address() error message for
tuple with empty strings.
---
django/core/mail/message.py | 2 ++
tests/mail/tests.py | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/django/core/mail/message.py b/django/core/mail/message.py
index f3fe6186c7f5..4f8c93e9e55e 100644
--- a/django/core/mail/message.py
+++ b/django/core/mail/message.py
@@ -97,6 +97,8 @@ def sanitize_address(addr, encoding):
domain = token.domain or ""
else:
nm, address = addr
+ if "@" not in address:
+ raise ValueError(f'Invalid address "{address}"')
localpart, domain = address.rsplit("@", 1)
address_parts = nm + localpart + domain
diff --git a/tests/mail/tests.py b/tests/mail/tests.py
index 54a136c1a98b..848ee32e9f80 100644
--- a/tests/mail/tests.py
+++ b/tests/mail/tests.py
@@ -1084,9 +1084,10 @@ def test_sanitize_address_invalid(self):
"@",
"to@",
"@example.com",
+ ("", ""),
):
with self.subTest(email_address=email_address):
- with self.assertRaises(ValueError):
+ with self.assertRaisesMessage(ValueError, "Invalid address"):
sanitize_address(email_address, encoding="utf-8")
def test_sanitize_address_header_injection(self):