You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2014/01/29 16:08:09 UTC

[jira] [Commented] (VALIDATOR-331) IBANCheckDigitTest.createInvalidCodes(String[] codes) uses wrong values

    [ https://issues.apache.org/jira/browse/VALIDATOR-331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13885408#comment-13885408 ] 

Sebb commented on VALIDATOR-331:
--------------------------------

This was spotted when checking VALIDATOR-330.
When IE98xxxx was added to the list of valid codes, this caused some invalid checkdigit tests to fail.
The test case code generated the string IE01xxxx which has the same result mod 97, so is equally valid currently (the code does not reject impossible check digits).

> IBANCheckDigitTest.createInvalidCodes(String[] codes) uses wrong values
> -----------------------------------------------------------------------
>
>                 Key: VALIDATOR-331
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-331
>             Project: Commons Validator
>          Issue Type: Bug
>            Reporter: Sebb
>
> The method IBANCheckDigitTest.createInvalidCodes(String[] codes) tries to
> create bad check-digit IBANs from valid ones by replacing the check digit pair with something different.
> However the code to do this is faulty, as it assumes check digits are in the range 00-95. This is wrong, as check digits are actually in the range 02-98.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)