-
Notifications
You must be signed in to change notification settings - Fork 130
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
Invalid IBAN Considered Valid #72
Comments
According to https://runkit.com/embed/y2e8cpx51ogy, the bad list is larger:
var IBAN = require("iban")
const iban_list = ['GB33BUKB20201555555555', 'GB94BARC10201530093459', 'GB94BARC20201530093459', 'GB96BARC202015300934591', 'GB02BARC20201530093451', 'GB68CITI18500483515538', 'GB24BARC20201630093459', 'GB12BARC20201530093A59', 'GB78BARCO0201530093459', 'GB2LABBY09012857201707', 'GB01BARC20714583608387', 'GB00HLFX11016111455365', 'US64SVBKUS6S3300958879'];
let res = [];
iban_list.forEach(function(iban) {
res[iban] = IBAN.isValid(iban);
});
res; |
Hello,
The other examples either give the same answer as iban.com, or expectedly return |
also lowercase country code is considered valid although standard specifies that all letters in IBAN MUST be uppercase. |
Hello, I found another case that is being considered valid by the library but invalid on iban.com ES1100753038790600500941 Hope it helps! |
@LaurentVB This is also a problem in my current customer project where we are using the Iban library. Can you already estimate when this will be fixed? |
yeah we also got this problem. Accepting chars like '?' , '.' etc in the middle of the iban. |
Why you even let user enter those chars, clean it up before sending it to validator? I think this library should not be responsible for cleanup. |
Hey, yes, we are validating inputs before. Still, I do not agree with your comment. In the main page there is this: |
That means there is an error in ckecksum calculation ... |
There actualy is a problem with the IBAN Checksum: BE77776593869767 |
Perhaps a simple fix is that you run this on your input IBAN string before validating: input = input.replace(/[^a-zA-Z0-9]/g, ''); This way all weird characters are filtered out, perhaps it could be included in this script as well? |
According to https://www.iban.com/testibans the following IBANs are invalid:
GB00HLFX11016111455365
GB01BARC20714583608387
But this library considers these IBANs as valid.
The text was updated successfully, but these errors were encountered: