PaymentCodeHasher.php
1.11 KB
-
Fix payment terminal security holes, add payment tests · b92370dc
- Payment code: crypt() with an empty salt returns '*0' for any code since PHP 8, and password changes left the salt empty since FOSUser removal: any code was accepted. Generate a salt again on password change and on code definition; PaymentCodeHasher rejects empty salts/hashes and uses hash_equals. - /encaissement: account, payment code and conventionnement maximum checks are now also done at the validation step, which could be posted directly. - tests/Smoke/PaymentTerminalTest: terminal access, success (prestataire, caissier), errors (no code, wrong code, insufficient balance, disabled account, unsalted code), conventionnement mode. - Shared functional test helpers moved to SmokeClientTrait.
Damien Moulard authored
×