sahvx655-wq opened a new pull request, #415: URL: https://github.com/apache/commons-validator/pull/415
`SedolCheckDigit.toInt` already rejects out-of-range and non-alphanumeric characters, but it accepts vowels. The SEDOL alphabet deliberately omits A, E, I, O and U (as noted in the Wikipedia reference in the class Javadoc), so no genuine SEDOL contains one. Whilst working through these routines I generated a correct modulus-10 check digit for bodies containing vowels and found `SEDOL_CHECK_DIGIT.isValid` returning true for codes such as `B0AKT02` and `AAAAAA0`. There is no `SedolValidator` wrapping this routine, so `SedolCheckDigit.isValid` is the only public SEDOL entry point and the over-acceptance is user visible: a string that can never be a real SEDOL passes validation purely because its check digit happens to line up. The fix rejects vowels in `toInt`, next to the existing alphanumeric-range check, which is where the other per-character SEDOL rules already live, so the whole character set stays enforced in one place rather than being pushed onto callers. The added test asserts vowel-bearing codes with valid check digits are rejected while the existing consonant fixtures still validate; it fails before the change and passes after. - [x] Read the [contribution guidelines](CONTRIBUTING.md) for this project. - [x] Run a successful build using the default Maven goal with `mvn`. - [x] Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Each commit in the pull request should have a meaningful subject line and body. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
