JoshData / JoshData/python-email-validator
Version 2.3 breaks a ton of pydantic models and rules
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 1.4k
- Forks
- 140
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
This decision will result into a nightmare:
• The library no longer checks that the local part is at most 64 characters because a more careful reading of RFC 5321 indicates the limit is optional and such email addresses have been found in the wild. However the check can be restored using a new strict=True parameter, and the overall 254 character email address length limit is still in place.
All the articles I found on the Internet specifies: 64 before @ and 255 after, with an overall size limited to 254.
Refering to RFC 5321, it reads:
4.5.3.1. Size Limits and Minimums
There are several objects that have required minimum/maximum sizes.
Every implementation MUST be able to receive objects of at least
these sizes. Objects larger than these sizes SHOULD be avoided when
possible. However, some Internet mail constructs such as encoded
X.400 addresses (RFC 2156 [35]) will often require larger objects.
Clients MAY attempt to transmit these, but MUST be prepared for a
server to reject them if they cannot be handled by it. To the
maximum extent possible, implementation techniques that impose no
limits on the length of these objects should be used.
Extensions to SMTP may involve the use of characters that occupy more
than a single octet each. This section therefore specifies lengths
in octets where absolute lengths, rather than character counts, are
intended.
4.5.3.1.1. Local-part
The maximum total length of a user name or other local-part is 64
octets.
4.5.3.1.2. Domain
The maximum total length of a domain name or number is 255 octets.
I do not see any hint about optional.
Also, as a backward compatibility, it would have been better to make the strict parameter a lazy or compat parameter which defaults to True and not False....
Please advice.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
L’issue ne nomme aucun fichier, test ou point d’entrée. Commencez par examiner la modification de la version 2.3 au regard des limites citées de RFC 5321 et des régressions Pydantic-model signalées ; la tâche ne sera considérée comme terminée qu’avec une décision explicite concernant les valeurs par défaut de compatibilité et la validation stricte de la partie locale.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- backend
- Type d'issue
- Bug
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100