Opened 6 months ago

Closed 6 months 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 ksg, 6 months ago

Owner: changed from nobody to ksg
Status: newassigned
Last edited 6 months ago by ksg (previous) (diff)

comment:2 by Mariusz Felisiak, 6 months ago

Triage Stage: UnreviewedAccepted

comment:3 by Mariusz Felisiak, 6 months ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.
Back to Top