zendframework / zend-validator

Validator component from Zend Framework
BSD 3-Clause "New" or "Revised" License
181 stars 136 forks source link

Fixes File\Hash validator to work with digit-only hashes and match algo #277

Closed michalbundyra closed 4 years ago

michalbundyra commented 4 years ago

Validation was failing when file hash was digit-only due to issue with the implementation and silent type conversion when using array_keys on array with digit-only string keys.

Also fixed other issue, where hash was not checked against the algorithm.

Fixes #276

Provide a narrative description of what you are trying to accomplish:

froschdesign commented 4 years ago

@webimpress The failure is not related to this PR:

1) ZendTest\Validator\EmailAddressTest::testNoMxRecordARecordFallback
Email host contains MX records
Failed asserting that true is false.
/home/travis/build/zendframework/zend-validator/test/EmailAddressTest.php:404

https://travis-ci.org/zendframework/zend-validator/jobs/604109135#L428

michalbundyra commented 4 years ago

@froschdesign

The failure is not related to this PR

Yes, I've seen it before, it looks like example.com domain has now defined some MX records, but before it hasn't. Because of that some tests are failing. We need to sort it out somehow - maybe our custom subdomain without mx records?