Email domain allowlists reject equivalent mixed-case domains

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

メンテナーはふだん 4 日以内に返信

@IlyaKhalafi がすでに取り組んでいます。

2026年11月4日 から。

  • #2403 @IlyaKhalafi による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python
領域
backend

調査の方向性

Read the EmailValidator implementation and its existing tests for allowed_domains. Compare how the address domain and configured entries are matched, then run the relevant validator tests. Done means mixed-case domain spellings are accepted when they are equivalent, while addresses outside the allowlist remain rejected; pull request #2403 is already open for this issue.

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

説明

EmailValidator accepts mixed-case domains normally, but enabling allowed_domains makes the same domains case-sensitive. This rejects valid addresses on an allowed domain.

from tortoise.validators import EmailValidator

EmailValidator()("[email protected]")  # accepted
EmailValidator(allowed_domains=["example.com"])("[email protected]")
# InvalidEmailAddress
EmailValidator(allowed_domains=["EXAMPLE.COM"])("[email protected]")
# InvalidEmailAddress

I reproduced this on current develop. RFC 5321 section 2.4 specifies that mailbox domains are not case-sensitive. Comparing the domain and allowlist entries in lowercase would preserve the restriction while accepting equivalent domain spellings.

主要言語
Python
スター
5.6k
フォーク
540
平均マージ
4日 7時間
マージ済み PR(30日)
31

環境構築

はじめの一歩

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

tortoise/tortoise-orm のほかの issue

tortoise/tortoise-orm の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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