quickfix-j/quickfixj

`DefaultApplVerID` outside of known range throws `QFJException`

taneryilmaz opened this issue · 2 comments

Bug Description
Quickfix/j throws QFJException for DefaultApplVerID of which value is outside the range 0-9
This exception is not caught in the application and the client socket connection remains open without getting any response.

How To Reproduce
In the Logonmessage, a value outside the range 0-9 is entered for tag 1137, for example 99 (1137=99).

8=FIXT.1.1|9=126|35=A|49=SENDER|56=EXCHANGE|34=1|52=20231013-19:59:16|50=SUBID|553=USERNAME|554=Pass1|108=60|98=0|1137=99|141=Y|10=049|

Server Config

[default]
ConnectionType=acceptor
...
BeginString=FIXT.1.1
DefaultApplVerID=FIX.5.0SP2
...
UseDataDictionary=Y
RejectGarbledMessage=Y

Expected Behavior
Client request should be rejected and connection should be closed.

System information

  • Java version: 17
  • QFJ Version: 2.3.1

Excepiton Stack
22:59:16.301 [NioProcessor-21] ERROR quickfix.mina.acceptor.AcceptorIoHandler - org.quickfixj.QFJException: Unknown or unsupported ApplVerID: 99 org.quickfixj.QFJException: Unknown or unsupported ApplVerID: 99 at quickfix.MessageUtils.toBeginString(MessageUtils.java:294) at quickfix.DefaultDataDictionaryProvider.lambda$new$1(DefaultDataDictionaryProvider.java:50) at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708) at org.quickfixj.SimpleCache.computeIfAbsent(SimpleCache.java:41) at quickfix.DefaultDataDictionaryProvider.getApplicationDataDictionary(DefaultDataDictionaryProvider.java:67) at quickfix.MessageUtils.parse(MessageUtils.java:147) at quickfix.mina.AbstractIoHandler.messageReceived(AbstractIoHandler.java:129) at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:1015) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650) at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:49) at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1128) at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:418) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:257) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650) at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:49) at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1128) at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:122) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650) at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:643) at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:539) at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$1200(AbstractPollingIoProcessor.java:68) at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.process(AbstractPollingIoProcessor.java:1224) at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.process(AbstractPollingIoProcessor.java:1213) at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:683) at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833)

Thanks for the detailed description. Do you happen to have the time to create a unit test out of this?

You're welcome.
I'm having trouble finding time these days. I'll try to add it when I have time.
Thanks again.