python / python/cpython

Make Base64 decoding strict by default

オープン
#148,204 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

extension-modules stdlib type-feature
主要言語
Python
スター
77.2k
フォーク
35.9k
PR マージ指標
PR 指標を取得中

説明

Feature or enhancement

Earlier specifications of Base64 encoding (e.g. RFC 1421, RFC 2045) allowed to ignore any non-alphabetical characters, and that was the behavior of the base64 module. The later specifications (RFC 3548, RFC 4648) require that non-alphabetic characters should be errors, unless opposite is explicitly specified. The Base64 decoder in Python got the option to enable more strict behavior, and now it got option to specify what exactly characters can be ignored.

I think that we should make Base64 decoding strict by default. I am not sure when we should do this, in 3.15 or in future versions. There is no reasonable way to use warnings, they would do more harm.

cc @gpshead

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、base64 モジュールの現在のデコードオプションと、issue に記載されている RFC 3548 および RFC 4648 の要件を確認します。デフォルトを変更することによる互換性およびリリースポリシー上の影響を判断し、その変更を Python 3.15 に含めるべきか、それともそれ以降のバージョンに含めるべきかを検討します。デフォルトの動作が決定され、移行計画または互換性計画について合意できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
backend
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。