-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Iban.isValid() method does not verify that the check digits match those that would be calculated #82
Comments
Apache Commons IBANCheckDigit class has an isValid method which simply first verifies the supplied iban has a check digit in the 02 - 98 range before then performing the modulus check. |
marcwrobel
added a commit
that referenced
this issue
Aug 8, 2021
Validation of IBANs and creditor identifiers with a check digit equals to 00, 01 or 99 will now raise an IllegalArgumentException instead of just being considered invalid. Such check digits are indeed not valid.
marcwrobel
added a commit
that referenced
this issue
Aug 8, 2021
Validation of IBANs and creditor identifiers with a check digit equals to 00, 01 or 99 will now raise an IllegalArgumentException instead of just being considered invalid. Such check digits are indeed not valid.
marcwrobel
added a commit
that referenced
this issue
Aug 8, 2021
Validation of IBANs and creditor identifiers with a check digit equals to 00, 01 or 99 will now raise an IllegalArgumentException instead of just being considered invalid. Such check digits are indeed not valid.
marcwrobel
added a commit
that referenced
this issue
Aug 8, 2021
Validation of IBANs and creditor identifiers with a check digit equals to 00, 01 or 99 will now raise an IllegalArgumentException instead of just being considered invalid. Such check digits are indeed not valid.
Thank you @edgeofoblivion for your report. The bug has been fixed and a new release of jbanking will be released today. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jbanking/src/main/java/fr/marcwrobel/jbanking/iban/Iban.java
Line 156 in ac28e38
Hello,
I've seen an unusual instance where the Iban.isValid(String iban) method returns true for what I believe to be an invalid Iban.
At the bottom of the method ultimately a modulus check is performed:
But a variation of a valid Iban (as seen in the example below which is based on a valid entry from your test class set of randomly generated valid Ibans) can also pass this modulus check and return true - no check is done to see if the generated Iban check digits match those from the given iban parameter.
Should some additional verification of the check digits be added to Iban.isValid() method?
The text was updated successfully, but these errors were encountered: