Skip to content

Backport alternative Base64 alphabet warnings to Python 3.12 - #973

Closed
saakshaat-singh wants to merge 1 commit into
conda-forge:3.12from
saakshaat-singh:ssingh/312-base64-backport
Closed

saakshaat-singh wants to merge 1 commit into
conda-forge:3.12from
saakshaat-singh:ssingh/312-base64-backport

Conversation

@saakshaat-singh

@saakshaat-singh saakshaat-singh commented Nov 16, 2026 •

Copy link
Copy Markdown

Before this PR

Python 3.12.16 silently accepts standard-alphabet characters when decoding with an alternative Base64 alphabet, the behavior tracked by CVE-2025-12781 and python/cpython#125346.

After this PR

==COMMIT_MSG==
==COMMIT_MSG==

This proposes a downstream backport of the warning behavior from python/cpython#141128, increments the Python 3.12.16 package build number, and adds installed-package checks for the warnings and decoded results.

For affected input, b64decode(..., validate=True) emits DeprecationWarning; non-strict and URL-safe decoding emit FutureWarning. Decoded bytes are preserved when warnings are not promoted to errors. This does not introduce unconditional rejection of standard-alphabet characters.

Upstream context

CPython explicitly declined this backport for 3.12, explaining that even warnings could break existing applications. This PR asks conda-forge maintainers whether to accept that downstream compatibility difference. A warning backport alone does not establish that applications validate the intended alphabet or that vulnerability scanners will recognize the rebuilt package as remediated.

This proposal is separate from the mail-command backports in #972, which can be evaluated independently.

Validation

The complete patch series applies to a clean v3.12.16 checkout and reproduces the tested source tree while preserving the original 23 packaging patches. The focused Base64 suite completed 37 tests using the released conda-forge Python 3.12.16 interpreter. Installed-package checks verify warning categories and unchanged decoded bytes, and the recipe passes conda-smithy recipe-lint. Full package builds remain for feedstock CI.

Review and next steps

  1. Obtain an explicit compatibility-policy decision from the Python feedstock maintainers in this PR, taking the upstream refusal into account. Review-routing help is available through the official conda-forge Zulip.
  2. If accepted, require the platform build matrix and installed-package checks to pass. If Backport IMAP and POP3 command validation to Python 3.12 #972 lands first, refresh this branch and update the build number and patch ordering before merge.
  3. Following publication, downstream consumers must adopt the rebuilt package and separately verify application behavior and vulnerability-scanner treatment. Strict alphabet validation remains an application responsibility on this branch.

Testing

Possible downsides?

Applications treating warnings as errors may now reject inputs they previously accepted. This is the reason upstream declined the stable-branch backport; the change preserves permissive decoding when warnings are ignored.

Are Docs needed?

@conda-forge-admin

conda-forge-admin commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipe/meta.yaml:

  • ℹ️ The use of pkg-config is deprecated. Please use pkgconf instead.
  • ℹ️ The recipe is not parsable by parser conda-souschef (grayskull). This parser is not currently used by conda-forge, but may be in the future. We are collecting information to see which recipes are compatible with grayskull.
  • ℹ️ The recipe is not parsable by parser conda-recipe-manager. The recipe can only be automatically migrated to the new v1 format if it is parseable by conda-recipe-manager.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/43939772964. Examine the logs at this URL for more detail.

@chrisburr

Copy link
Copy Markdown
Member

I see no reason here that justifies overruling the upstream decision to not backport this. This PR doesn't even match the upstream fix in newer releases.

@chrisburr chrisburr closed this Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants