Details
Description
When writing a custom acceptance test script there is a bug if you include a tag with '10' as the last two digits. This is because module InitiateMessageStep.java:line 47 contains a regex pattern that scans for a Checksum tag in the message.
// Matches FIX.X.X or FIXT.X.X style begin string
private static final Pattern MESSAGE_PATTERN = Pattern.compile("I(\\d,)(8=FIXT?\\.\\d\\.\\d
001)(.?)(10=.*|)$");
The problem is that the regex expression doesn't look to see if the '10=' falls at the beginning of a tag, thus it will erroneously match against any tag with '10=' in it such as '110=' (MinQty), '210=' (MaxShow), etc.
The fix for this is quite simple. Merely add the field separator before the '10=' which will allow a match only if '10=' falls at the beginning of a field.
// Matches FIX.X.X or FIXT.X.X style begin string
private static final Pattern MESSAGE_PATTERN = Pattern.compile("I(\\d,)(8=FIXT?\\.\\d\\.\\d\\001)(.?)(
00110=.*|)$");