You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Certain file extensions are considered equal by validators in some contexts. For example, Laminas\Validator\File\ExcludeExtension#isValid will treat file extensions 10 and 010 as equal (example.10 and example.010 have the same file extension in its eyes). This is a result of using == and in_array() without strict mode to check strings. The following both return true in PHP:
'10' == '010';
in_array('10', ['010']);
Expected behavior
example.10 should never be considered to have the file extension 010.
The text was updated successfully, but these errors were encountered:
Bug Report
Summary
Certain file extensions are considered equal by validators in some contexts. For example,
Laminas\Validator\File\ExcludeExtension#isValid
will treat file extensions10
and010
as equal (example.10
andexample.010
have the same file extension in its eyes). This is a result of using==
andin_array()
without strict mode to check strings. The following both return true in PHP:Expected behavior
example.10
should never be considered to have the file extension010
.The text was updated successfully, but these errors were encountered: