Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I just noticed that commerce_payment_validate_credit_card_exp_date('1', 'blah') will return TRUE.
The other functions inside of commerce_payment_credit_card_validate() handle numbers initially like so:
<?php
// Ensure every character in the number is numeric.
if (!ctype_digit($number)) {
return FALSE;
}
?>
Comment | File | Size | Author |
---|---|---|---|
#3 | commerce-check-numeric-cc-exp-date-validation-2-7.patch | 798 bytes | swim |
Comments
Comment #2
swim CreditAttribution: swim commentedTested and can confirm the bug exists. Patch attached.
Comment #3
swim CreditAttribution: swim commentedSorry, should have applied to both validation function, start date and exp date.