UUID wrongly parses hex values with underscores
オープン
まだ誰も着手していません。
stdlib
type-bug
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Bug report
Bug description:
import uuid
uuid.UUID("123_4567812345678123456781234567")
# UUID('01234567-8123-4567-8123-456781234567')
UUID parsing hex strings internally uses int method which from Python 3.6 accepts underscores (_) as digit separators
Changed in version 3.6: Grouping digits with underscores as in code literals is allowed.
Since the UUID does not performs sanitization of this character this may result in parsing as valid non-RFC compliant UUID values.
CPython versions tested on:
3.10, CPython main branch
Operating systems tested on:
Linux
Linked PRs
- gh-125652
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
レポートに示されている uuid.UUID のパース経路から始め、入力がどこで int に渡されるかを調べます。例の値で動作を確認します。アンダースコアを含む 16 進数文字列が拒否されるか、その他の方法でも有効な UUID としてパースされなくなり、このケースのテストカバレッジがあることを完了の条件とします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 25/100