You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Had to get into QuickFIX/Go, but it's growing on me. Thanks!
I'm building a FIX application using OpenPGP-signed FIXT messages.
This revealed what I found to be a bug in the order of StandardTrailer fields, as coded in
// In the trailer, CheckSum (tag 10) must be last.
functrailerFieldOrdering(i, jTag) bool {
switch {
casei==tagCheckSum:
returnfalse
casej==tagCheckSum:
returntrue
}
returni<j
}
This implicitly places Signature(89) before SignatureLength(93), instead of the intended order,
SignatureLength(93)if used at all
Signature(89)if used at all
Checksum(10)
Placing SignatureLength after Signature impairs customary front-to-back parsing.
Since these are the only three fields in the StandardTrailer component, reverse ordering of tag values would fix the problem (until a fourth field is added perhaps).
It does not help to manually map to bytes to have msg.cook() invoked.
The order of the msg.Trailer.SetField() calls also has no impact.
All those non-workarounds make sense, having seen the trailerFieldOrdering() implementation.
Let me know if you'd like a PR, but I'm new to QuickFIX and don't default to it.
The text was updated successfully, but these errors were encountered:
Had to get into QuickFIX/Go, but it's growing on me. Thanks!
I'm building a FIX application using OpenPGP-signed FIXT messages.
This revealed what I found to be a bug in the order of
StandardTrailer
fields, as coded inquickfix/message.go
Lines 87 to 97 in 2ed31c3
This implicitly places
Signature(89)
beforeSignatureLength(93)
, instead of the intended order,SignatureLength(93)
if used at allSignature(89)
if used at allChecksum(10)
Placing
SignatureLength
afterSignature
impairs customary front-to-back parsing.Since these are the only three fields in the
StandardTrailer
component, reverse ordering of tag values would fix the problem (until a fourth field is added perhaps).Minimal code to demonstrate this bug:
It does not help to manually map to bytes to have
msg.cook()
invoked.The order of the
msg.Trailer.SetField()
calls also has no impact.All those non-workarounds make sense, having seen the
trailerFieldOrdering()
implementation.Let me know if you'd like a PR, but I'm new to QuickFIX and don't default to it.
The text was updated successfully, but these errors were encountered: