﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34920	Reordered file extensions for improved validation	ksg	ksg	"`django.core.validators.FileExtensionValidator` had an `__eq__` method to compare the validator class. However, comparing arrays is not accurate when the order of elements in the arrays is different.

{{{
def __eq__(self, other):
    return (
        isinstance(other, self.__class__)
        and sorted(self.allowed_extensions) == sorted(other.allowed_extensions)
        and self.message == other.message
        and self.code == other.code
    )
}}}

This test case failed:

{{{
self.assertEqual(
    FileExtensionValidator([""jpg"", ""png"", ""txt""]),
    FileExtensionValidator([""txt"", ""jpg"", ""png""]),
)
}}}

So I suggest comparing two extension arrays after sorting them."	Bug	assigned	Core (Other)	dev	Normal				Unreviewed	1	0	0	0	0	0
