-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catch ofxget scan exceptions, allow V1 headers to support later versions #181
Conversation
oh good.
It can?? Got a reference? |
Sure, in the v2.3 standard here, section 1.4 OFX Versions:
My interpretation is that OFX v1.5.1+ can use V100 OFXHEADER/SGML with V2 messages. From https://cdn.nsoftware.com/help/BOF/acx/CCStatement_p_OFXVersion.htm:
|
Pulled the spec to check. Sadly OFX docs are now hosted by FDX, the level of care of whose stewardship is indicated by their bungling the link for OFXv1.0.3 ... which, despite their earnestly expressed wishes, still seems to have a dominant market position with FIs AFAICT. The
Trying hard to hold the pillow down tight on the face of v103.... but in any case, no version of the spec prior to OFXv2 accepts a DTD version higher than its own (naturally enough). The stuff about "message sets" means something a little different than maybe you might think - they're talking about the data structures that define the protocol for features like banking, investments, credit cards, billpay, etc.
However, adding a missing message set involves substantially more work than just relaxing a validator in the header parser, q.v. the docs for an example. Be that as it may - your FI is violating at least one aspect of the OFX spec... the combination of It sounds like they're also violating the protocol behavior specified in section 1.4, just above the bit you quoted:
If you saw As for your own FI's particular clown show... in general I am not favorably inclined to step on the endless whack-a-mole treadmill of punching holes in the conformance validation for every single lazy sloppy mutation committed by some FI somewhere; there are hundreds of them & I'm well over running around cleaning up FIs who aren't toilet trained. We're their customers... and not to put too fine a point on it, they're getting paid for this, not me. But then you did come bearing not only a minimally invasive fix, but also fixing up the tests... and really I'm not sure we gain anything significant by enforcing this validation, since (as mentioned above) we don't really proceed to make any particular use of the DTD version claimed in the metadata. Effectively this validator functions only as a sanity check (working fine, since your data is indeed insane) .... but not an especially important one... and it doesn't look like other users of the library will need to bear any real cost to accommodate your FI's clownshow, which is what really matters. Apologies, none of this is your fault & I don't intend to be obstructionist. A moment more to consider the issue. Regards |
No worries, I understand and agree with your considerations. Let me know if you think of another path I can explore. |
Objections here some more theoretical than practical. Hard to characterize real downside to set against demonstrated upside. Ship it baby. |
One of my banks returns OFXHeader V100 and VERSION 203 content.
When ofxget scans with V200 headers, the server returns html error message content which fails OFX header parsing as expected. However the OFXHeaderError exceptions were not caught by ofxget - read_scan_response and the command terminates.
This was preventing me from scanning and getting acct info. Updated ofxget to catch the OFXHeaderErrors.
Secondly, OFXHeaderV1 was updated to relax verification of version. My understanding of the OFX standard is that V1XX can support V2XX messages.