Describe the bug
Release-file sidecar URL fields are accepted when they point to python.org,
even if they do not correspond to the artifact URL on the same row. For example,
a source tarball entry can expose a GPG signature URL for a different tarball,
and the downloads page/API will present that sidecar as belonging to the listed
artifact.
To Reproduce
- In a local python.org development environment, create or submit an
authenticated release-file API write with:
url: https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tgz
gpg_signature_file:
https://www.python.org/ftp/python/3.14.0/Python-3.13.0.tgz.asc
- Observe that the row is accepted as long as both URLs use the allowed
python.org prefix.
- Load the release-file API response or release detail page and observe that
the sidecar is presented for the artifact on that row.
Expected behavior
Sidecar fields should either be blank or match the artifact URL with the
expected sidecar suffix, such as .asc, .sig, .crt, .sigstore, or
.spdx.json.
Additional context
Authenticated v1/v2 release_file POSTs with mismatched sidecar URLs returned
201 before the patch.
A focused regression test can cover both model validation and authenticated v1/v2
release-file API writes.
Describe the bug
Release-file sidecar URL fields are accepted when they point to
python.org,even if they do not correspond to the artifact URL on the same row. For example,
a source tarball entry can expose a GPG signature URL for a different tarball,
and the downloads page/API will present that sidecar as belonging to the listed
artifact.
To Reproduce
authenticated release-file API write with:
url:https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tgzgpg_signature_file:https://www.python.org/ftp/python/3.14.0/Python-3.13.0.tgz.ascpython.orgprefix.the sidecar is presented for the artifact on that row.
Expected behavior
Sidecar fields should either be blank or match the artifact URL with the
expected sidecar suffix, such as
.asc,.sig,.crt,.sigstore, or.spdx.json.Additional context
Authenticated v1/v2
release_filePOSTs with mismatched sidecar URLs returned201before the patch.A focused regression test can cover both model validation and authenticated v1/v2
release-file API writes.