Opened 2 years ago
Closed 2 years ago
#34934 closed Cleanup/optimization (fixed)
Made EmailValidator.__eq__() ignore domain_allowlist ordering.
| Reported by: | ksg | Owned by: | ksg |
|---|---|---|---|
| Component: | Core (Other) | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Just like in the case mentioned here: https://code.djangoproject.com/ticket/34920.
EmailValidator's eq() method also doesn't correctly handle the comparison of domain_allowlist when the order of elements in the arrays is different.
self.assertEqual(
EmailValidator(allowlist=["127.0.0.1", "localhost"]),
EmailValidator(allowlist=["localhost", "127.0.0.1"]),
)
Change History (3)
comment:1 by , 2 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
Version 0, edited 2 years ago by (next)
comment:2 by , 2 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:3 by , 2 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Fixed in a6c7db1d1d77e34600cec5c5044f4e90ed16691f.
Note:
See TracTickets
for help on using tickets.
ㅖㄲ: https://github.com/django/django/pull/17420