Title: Add the ignorechars parameter in the Base64 decoder · Issue #144001 · python/cpython · GitHub
Open Graph Title: Add the ignorechars parameter in the Base64 decoder · Issue #144001 · python/cpython
X Title: Add the ignorechars parameter in the Base64 decoder · Issue #144001 · python/cpython
Description: Feature or enhancement Earlier standards for Base64 (RFC 1421, RFC 1521) on which the base64 and binascii modules are based, specified that any non-alphabet characters should be ignored, and this is the default behavior of these modules....
Open Graph Description: Feature or enhancement Earlier standards for Base64 (RFC 1421, RFC 1521) on which the base64 and binascii modules are based, specified that any non-alphabet characters should be ignored, and this i...
X Description: Feature or enhancement Earlier standards for Base64 (RFC 1421, RFC 1521) on which the base64 and binascii modules are based, specified that any non-alphabet characters should be ignored, and this i...
Opengraph URL: https://github.com/python/cpython/issues/144001
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add the ignorechars parameter in the Base64 decoder","articleBody":"# Feature or enhancement\n\nEarlier standards for Base64 ([RFC 1421](https://datatracker.ietf.org/doc/html/rfc1421), [RFC 1521](https://datatracker.ietf.org/doc/html/rfc1521)) on which the `base64` and `binascii` modules are based, specified that any non-alphabet characters should be ignored, and this is the default behavior of these modules. More modern standard ([RFC 4648](https://datatracker.ietf.org/doc/html/rfc4648)) considers this a vulnerability, and specify that they should be rejected until the upper lever document states otherwise. Thus, `strict_mode`/`validate` parameters were added. But they are \"all-or-nothing\" -- either _all_ non-alphabet characters are rejected, or other errors are ignored. In some cases we need to ignore only the part of errors -- for example, ignore newlines and whitespaces, but not other invalid characters, or ignore padding errors.\n\n`a85decode()` has parameter `ignorechars` which could also be used to control Base64 decoding.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-144009\n* gh-144024\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/serhiy-storchaka","@type":"Person","name":"serhiy-storchaka"},"datePublished":"2026-01-18T14:41:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/144001/cpython/issues/144001"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1151cc2c-dad8-8313-1633-975b489e6adc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B558:21B41E:27E4A9:365974:696E7010 |
| html-safe-nonce | 63703cf0c30cffa3a71e53bd90ea6e85e9a48bdf1a2e7d8a307e96e627569757 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTU4OjIxQjQxRToyN0U0QTk6MzY1OTc0OjY5NkU3MDEwIiwidmlzaXRvcl9pZCI6IjMyNzQxNzA2NDgwMjMxNjY5OTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | cb68ae2ee79e9d968bbd92ca4f0f88dcd48cb446322b4769261fc7c523305ff6 |
| hovercard-subject-tag | issue:3826863124 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/144001/issue_layout |
| twitter:image | https://opengraph.githubassets.com/480f649f509042edfab6cf13b770074ae105136b89c3e5210ec7c1cfc410399c/python/cpython/issues/144001 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/480f649f509042edfab6cf13b770074ae105136b89c3e5210ec7c1cfc410399c/python/cpython/issues/144001 |
| og:image:alt | Feature or enhancement Earlier standards for Base64 (RFC 1421, RFC 1521) on which the base64 and binascii modules are based, specified that any non-alphabet characters should be ignored, and this i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | serhiy-storchaka |
| hostname | github.com |
| expected-hostname | github.com |
| None | dd24262d9e4947a6c63df018b01e9a6da49caaf8259148a56a04b665d15d66b3 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 307ab96ec5f21762ff6c530a60b1ef6b1e74dd5a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width