zendframework / zend-validator

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

#259 Validation for breached passwords #264

Closed DragonBe closed 4 years ago

DragonBe commented 5 years ago

This is the UndisclosedPassword validator discussed in #259 which uses PSR-18 http client interface for communicating with Have I Been Pwned? web service for validating passwords in a secure, safe way using K-Anonymity method.

IMPORTANT: The thing that might be a problem for this pull request is that PSR-18 composer package requires PHP 7.0 or higher.

All functionality is documented and provided with unit tests ensuring 100% code coverage. image

Please review this pull request and let me know if I need to change or improve the functionality.

weierophinney commented 4 years ago

Thanks, @DragonBe! With the imminent transition to the Laminas Project, I am expecting we will likely revisit the ability to bump a PHP version during a major series, and, as such, decided to do so here, as it will ensure we do not have any BC issues with your new class in the future. I added visibility to all constants, and added typehints to parameters and return values of all internal methods. Will release shortly with version 2.13.0.