fints 0.3.0
fints: ^0.3.0 copied to clipboard
FinTS 3.0 and 4.1 client for German banks. Retrieves accounts, balances and transactions with PIN/TAN, two-step TAN, decoupled approval and PSD2 strong customer authentication.
0.3.0 #
An app may notice these changes: FinTsTransport.post takes the new parameter abortTrigger, which every
implementation must add to its post; a TAN the TAN method rules out fails the call with a FinTsTanException without
return codes before it is sent; an account the app builds itself that the bank names nowhere fails with
FinTsUnsupportedException where the user parameter data list all permitted transactions, and the allowedTransactions
an app sets on an account count for nothing; a refused login is kept in client.state, so that a client restored from
it does not send the PIN either until clearLoginRefusal lifts the refusal; FinTsClient has the new members
loginRefusal and clearLoginRefusal; a refused login is a FinTsLoginRefusedException, also where the bank ends the
dialog in answer to the login, which was a FinTsDialogAbortedException; a missing TAN method or medium is a
FinTsTanSetupException, not a FinTsUnsupportedException; FinTsConfig throws an ArgumentError for a country code
of other than three digits, a German bank code of other than eight digits, a URL with a user name or password, a URL
that WHATWG URL refuses, such as one with a port above 65535, and a host with other characters than ASCII and the Latin
letters the package converts to punycode, drops blanks around the login details and the product, and keeps its url as
WHATWG URL writes it, such as https://bank.example/ for https://bank.example and with punycode for a host with
umlauts, which also names the server in client.state; an ArgumentError carries no invalidValue; any error a
transport throws, an Error or another FinTsException included, is a FinTsTransportException that keeps only its
message, or only its type where it is of a type the package does not know, HttpTransport rejects a timeout or size
limit that is not positive, sends to the URL as WHATWG URL writes it and fails before sending for a URL that WHATWG URL
refuses or whose host the package cannot convert to punycode, and in a browser its own client is fetch rather than
package:http's BrowserClient; close() completes the abortTrigger of a request still on its way after five seconds,
so that HttpTransport aborts it, which fails the running call with a FinTsTransportException, where it waited for
the answer up to the transport's timeout; more bank data fail with FinTsProtocolException (FormatException from
Mt940 and Camt): an answer to another message than the one sent or broken in its framing, an approval asked for by
more than 3 further pages of a query or asked again in answer to an approval, a balance or camt transactions of another
account, MT940 statements that do not balance or hold no field, a camt document without any report, statement or
notification, XML that XML 1.0 does not allow, an empty element nested more than 100 levels deep, a camt date with a UTC
offset beyond ±14:00, with anything else after the date or with 24:00:00 and a fraction of a second other than zero, a
camt currency other than three capital letters, a query of more than 200,000 statements and transactions, and in FinTS
4.1 an answer whose body holds an encrypted or compressed part; a SEPA account list the bank answers by ending the
dialog is not asked for again by the same client; a SEPA keyword in the text the payer or payee writes no longer counts,
nor in camt an EREF, MREF or CRED that only that text states; the subfields of an MT940 purpose or name are joined with
a blank after one that ends a phrase, and a camt purpose line longer than 35 characters goes on in the next one without
a blank; in FinTS 3.0, FinTsFeedback.parameters and TanChallenge.reference hold one character per byte the bank
sent; TanChallenge.image is null for an SVG or an alias such as image/jpg and has its mimeType in lower case;
flickerCode is null for a code that would not render as the bank sent it; Account keeps IBAN and BIC without
blanks and in capitals; in FinTS 3.0, an integer of the parameter data in hex or beyond ±(2^53 - 1) counts as not
stated, and an account of three elements in the user parameter data is read as account number, sub-account and country
code unless its second element, but not its third, has three digits; a FormatException of Mt940, Camt,
Amount.parseDecimal or FlickerCode.parse prints its message only; TanMedium.toString leaves out the medium name
and shows the status by its name, such as active, FinTsFeedback.toString shows the return code only, and
BankMessage.toString neither subject nor text; some messages an app may match on read otherwise: malformed XML gives
'Invalid XML:
Fixes from a review of the whole package against the specification; fints-ts 0.4.0 has the same for FinTS 3.0:
-
A one-step synchronization the bank refuses with
9955and3920, as PIN/TAN B.8.2 has it for a user bound to two-step methods, is repeated with a two-step method the user may use. It was a refused login thatclearLoginRefusalcould not get past, since the next login was a one-step synchronization again. -
A refused login the session takes care of, such as a TAN method the user may not use, no longer outlasts a remedy that fails, such as a
tanMethodSelectorthat throws or aclose()while it runs. The call fails with that error, and neitherloginRefusalnorclient.statekeeps a refusal the bank gave for anything but the PIN. -
A damaged refused-login part of
client.statefails closed: the client restores a refusal without return codes and sends the PIN no more untilclearLoginRefusal. It discarded the whole state, and could send a PIN the bank had refused. -
The bank's dialog abort message (Formals B.7.6), which may name the dialog
unbekanntand the message 9999, fails the call with the bank's text as aFinTsBankException, aFinTsDialogAbortedExceptionfor 9800, and no dialog end follows it. The call failed withFinTsProtocolException('The answer belongs to another message than the one sent'), and the client sent a dialog end the bank had already ended. -
getBalance(HKSAL 7 and 8) andgetTransactions(HKKAZ 7, HKCAZ) name an IBAN only with its BIC, and the national account next to it only where HISPAS allows it ("Nationale Kontoverbindung erlaubt", Messages B.3.2). An account without BIC goes out with its national account. -
In FinTS 3.0,
FinTs3Clientthrows anArgumentErrorfor a user ID or customer ID longer than 30 characters (data typeid). The bank refused such a login with a syntax error, which counted as a refused login. -
close()no longer fails, then or later, for an error of the logger,onBankMessageoronWarning, which hid the error of the call before it. -
In FinTS 4.1, a client whose TAN method is chosen, by
selectTanMethodor fromclient.state, logs in without the synchronization that only tells the TAN methods. That cost a second login and approval, for a bank that sends no user parameter data at every start. -
In a browser,
HttpTransportsends no cookies or referrer and lets no cache keep the exchange (credentials: 'omit',referrerPolicy: 'no-referrer',cache: 'no-store'). -
MT940: the counterparty's IBAN and BIC come from subfields 31 and 30 only, no longer from
IBAN+andBIC+in the purpose, which the payer writes. Subfield 30 next to an IBAN is the BIC only where it reads as one, else the bank code. A:61:referenceKREF+takes theKREFof:86:. A balance date0or000000means no date (openingDate,closingDate), where it failed the statement. A leading byte order mark or blank no longer hides the first:20:. -
camt: a structured creditor reference (
RmtInf/Strd/CdtrRefInf/Ref) is the purpose where the remittance information states no text, and remittance information of more than 65,536 characters fails withFormatException. -
Only a challenge that starts with
CHLGUCand states the length of its code counts as a combined one, and blanks around the length of its instruction text are dropped.FlickerCode.parsekeeps a blank in the data of a code, and refuses a start code of length 0 or with bit 6 set, and a tenth control byte that announces another. Where HHD_UC holds neither an image nor a flicker code, the code in the challenge text counts. A photoTAN container without image bytes is no image. -
TanAnswer.tan('')cancels an app approval, as it does a TAN challenge, where it failed with anArgumentError. -
An answer that rejects nothing but brings no balance fails
getBalancewithFinTsProtocolException, notFinTsBankException. -
A user parameter data account extension padded with NBSP or NEL is read,
FinTs4Client.queryVersionscloses the transport it is given also for a URL it refuses, andTanChallenge.tanMediumNamenames no medium the client did not send. The README savesclient.stateafterclose(), whose answers may change it. -
In FinTS 4.1, an answer whose body holds an encrypted or compressed part (
EncryptedData, XML-Syntax V.3 and V.4), such as its response list, fails withFinTsProtocolException, as an encrypted body does. The part was skipped, so thatgetTransactionsreturned no transactions. -
In FinTS 4.1, a PIN or TAN with control characters below
U+0020, TAB, CR and LF included,U+FFFE,U+FFFFor half of a surrogate pair is not sent, since XML 1.0 or the FinTS typeanrules them out. The PIN fails with anArgumentErrornamedpin, inFinTs4ClientandclearLoginRefusal, the TAN withFinTsTanException, as another TAN the TAN method rules out. Such a PIN or TAN went out, and the bank could read another one and count a failed attempt. -
camt: a date with anything after
YYYY-MM-DDbut a time or a UTC offset as XML Schema has it (Zor up to ±14:00), such as2024-01-0299, is unreadable:Camt.parsethrowsFormatException, andgetTransactionsfails withFinTsProtocolException. It counted as the date written. In FinTS 4.1 such a date counts as not stated. -
camt: the currency of an amount (
Ccy) is read without blanks around it, and one that is not three capital letters, such aseur, failsCamt.parsewithFormatExceptionandgetTransactionswithFinTsProtocolException. It became the currency of the amount as written, and one with blanks around it did not match that of the entry, which kept a batch booking from being split. -
MT940: the subfields of the purpose (
?20to?29,?60to?63) and of the name (?32,?33) are joined as a bank cuts its text into lines of 27 characters, as camt purpose lines are at 35: one of 27 characters or more goes on in the next as it is, and any other ends a phrase, which the next one follows after a blank.?20Text one?21text tworeadsText one text two, where it readText onetext two; the SEPA keywords are read from the text so joined. -
The TAN the user enters is checked before it is sent: one longer than
TanMethod.maxTanLength, with anything but the digits 0 to 9 for aTanMethod.numericTanmethod (in FinTS 4.1 also one whose parameters leave outFormatTAN), or, in FinTS 3.0, with characters outside ISO 8859-1 fails the call with aFinTsTanExceptionwithout return codes, whose message names the rule but not the TAN, and the client ends the bank dialog, so that the next call logs in anew. Such a TAN went to the bank, which counted it as a failed attempt and may cancel the order or block the TAN medium, and the call failed with the bank'sFinTsTanException, for a TAN asked for an order with the dialog kept open. Full-width characters, as East Asian input methods type them, count as their ASCII counterparts; they went out as UTF-8 (FinTS 3.0) or unchanged (4.1) -
getBalanceandgetTransactionsrefuse an account the bank names neither in the user parameter data nor in the SEPA account list withFinTsUnsupportedException, without sending the query, where the user parameter data list all permitted transactions (UPD-Verwendung 0,UpdUsage0 in FinTS 4.1): the bank permits nothing they leave out; the login and the SEPA account list may have gone out. Where the lists are incomplete, such an account goes out with its account number, sub-account, IBAN, BIC, bank and country code and currency only. It was sent, such as one with a typo or of another bank, as if it permitted anything, unless theallowedTransactionsandallowedTransactionsCompletethe app had set on it ruled the query out; they also chose the transaction format ofTransactionFormat.auto, and count for nothing now. An account built from its IBAN alone, where the user parameter data name accounts by number only, is found through the SEPA account list: where the bank does not deliver that list, it counts as named nowhere. So may one built from its number alone where the user parameter data name accounts by IBAN only, as FinTS 4.1 ones may; it went out with its number -
A refused login is kept in
client.state, as the bank's return codes, so that a client restored from it does not send the PIN either, also one for another server of the bank or the other FinTS version; the state holds nothing of the PIN, and one saved by 0.2.0 or earlier holds no refusal. The refusal lived in the client only, so that an app that built a new client for each attempt sent a refused PIN again each time. Run the clients of one user one after another, each restored from the state the one before saved: the state saved last wins -
So is the count of logins whose answer the client could not read: after two in a row, also across restored clients, the client refuses the login itself, with a
FinTsLoginRefusedExceptionwithout return codes. It was aFinTsBankException, and a new client sent the PIN again -
FinTsClient.loginRefusaltells the refused login before any call, andFinTsClient.clearLoginRefusal(pin)lifts it with a PIN the user has entered anew. It ends the open dialog, so that the next call logs in with that PIN, and forgets the TAN medium, which the bank may have refused. It cannot lift new login data (3072) and throws theirFinTsLoginDataChangedExceptioninstead. An app that created a new client to retry after a refused login callsclearLoginRefusalnow; a class that implementsFinTsClientneeds both members -
A refused login is a
FinTsLoginRefusedException, whichFinTsPinExceptionandFinTsLoginDataChangedExceptionnow extend. It was a plainFinTsBankException, and aFinTsDialogAbortedExceptionwhere the bank ended the dialog in answer to the login, after which, the README said, the next call logs in anew, though the client did not log in again;on FinTsBankExceptionstill catches it. New login data next to an error in the answer to a login are aFinTsLoginDataChangedExceptionas well, unless the error rejects the PIN, which stays aFinTsPinException; such an answer was a plain refusal, after which a3920in it made the client log in once more with the old data. So are new login data next to an error about the order a FinTS 4.1 login carries, the lookup of the TAN media, where the bank keeps the dialog open, which the client then ends; it took them for a rejected list and logged in with the old data again -
Where the client has no TAN method or medium to log in with, the call fails with the new
FinTsTanSetupException, which is noFinTsUnsupportedException: a TAN method that needs a medium the client could not learn, a one-step synchronization the bank refuses where every method the user may use needs a medium, and a bank that offers the user only TAN methods the client cannot run, such as those of process variant 1. These wereFinTsUnsupportedExceptions, which stand for a transaction the bank does not offer, so that an app could hide a feature where the user had only to pass a medium toselectTanMethod; an app that catchesFinTsUnsupportedExceptionthere must catchFinTsTanSetupExceptionnow -
FinTsConfigthrows anArgumentErrorfor a country code of other than three digits (280for Germany) and, with country code280, for a bank code of other than eight digits, such as370 400 44, before anything is sent. Only an empty value was refused:DEor a BLZ with blanks went out in the anonymous dialogs and then with the PIN in a login the bank refused -
FinTsConfigthrows anArgumentErrornamedurlfor a URL with a user name or password, and the message leaves them out. Such a URL was accepted, and the transport sent the user name and password to the server with every message, as HTTP Basic authentication -
FinTsConfig.urlis the URL as WHATWG URL writes it, which is what a browser sends: an empty path becomes/, an IPv6 address takes its short form (RFC 5952), such as[2001:db8::1], an IPv4 address its four decimal parts, such as127.0.0.1for127.1, a'in the query becomes%27, and a host with other than ASCII characters becomes punycode, such asxn--bcher-kva.exampleforbücher.example.FinTsConfigthrows anArgumentErrornamedurlfor a URL WHATWG URL refuses, such as one with a port above 65535 or the hostbank.123, and for a host with other characters than ASCII and the letters of ISO 8859-1 and Latin Extended-A (such asä,éorł), or with one of the few of these letters that a browser maps to others, such asij, since the package does not implement the mapping (UTS #46) a browser applies before punycode.FinTs4Client.queryVersionstakes its URL the same way, andHttpTransport.postsends to the URL so: for a URL that WHATWG URL refuses or whose host the package cannot convert, it fails with aFinTsTransportExceptionbefore anything is sent. The URL was kept as given, so that a host such asbücher.examplefailed every request on native platforms before sending. A saved state names the server by its host asFinTsConfig.urlwrites it: one saved by 0.2.0 or earlier for a host written otherwise, such as an IPv6 address in its long form, counts as another server's, so that the next login synchronizes anew -
FinTsConfigdrops leading and trailing blanks of the bank code, country code, login name, customer ID and product, as FinTS sends them without (Formals B.4.1):config.userIdof' alice 'isalice, and a state saved foraliceholds foraliceas well. The values were kept as given: a padded spelling was another user toclient.state, whose state was dropped at the cost of a new synchronization, a padded product ID or version failed the FinTS 3.0 length check although it would have gone out short enough, a padded bank code becameAccount.bankCodewhere the bank stated none, and FinTS 4.1 sent the blanks -
In FinTS 3.0,
FinTs3Clientthrows anArgumentErrorfor a bank code with characters outside ISO 8859-1 or longer than 30 characters, the field's limit. Such a bank code went out, as UTF-8 or too long, in the anonymous dialogs and then with the PIN in a login the bank refused -
An
ArgumentErrornames the rejected argument but leaves out its value, which may be a login name, a customer ID or a URL with a password:invalidValueisnull, and the message says no more than, for example, "At most 25 characters in FinTS 3.0". It carried the value and printed strings and dates in its text; the one for login data or a product FinTS 3.0 cannot send named no argument, and now namesuserId,customerId,productId,productVersion,bankCodeorpin.FinTsConfigchecks the URL first, then the country code, the bank code, the login name, the customer ID, the product ID and its version, each completely, and names the first value at fault. A period whose start lies after its end fails with 'fromlies on a day afterto' -
Any error a transport throws, another
FinTsExceptionor anErrorincluded, fails the call as aFinTsTransportExceptionwithoutstatusCodethat keeps only the error's message, or only its type where it is of a type the package does not know (see below), and the client drops the dialog without a dialog end, as after a broken connection, so that the next call logs in anew. A transport'sFinTsPinExceptionorFinTsBankExceptionpassed for the bank's answer: it had the anonymous request for the bank parameter data sent once more and the synchronization go out with the PIN, a SEPA account list failed so ignored, and the dialog go on, or end, under a message number the bank had seen; anError, a thrown string included, reached the app as it was, and the dialog end went out under the failed message's number -
HttpTransportthrows anArgumentErrorfor atimeoutthat is not positive or longer than 2147483647 milliseconds, which a timer on the web cannot wait, and for amaxResponseBytesthat is not positive. It took them, and then failed every request, or with a negative size limit every answer -
close()gives a request on its way five seconds to bring its answer, which counts as any other: the logger gets it, and the savedstatekeeps what it brings. After that, it completes the request'sabortTrigger(see below), on whichHttpTransportaborts the request, and the running call fails with aFinTsTransportException'Request aborted'. The client drops that request's dialog without a dialog end, as after any transport failure; the ends of its other dialogs, such as one still open, have five seconds once that request is over, are aborted the same way, and none goes out later. Soclose()resolves within about 5 seconds where the bank has stopped answering, and 10 at most, withHttpTransportor a customFinTsTransportthat stops a request on its trigger. It waited for the answer up to the transport's timeout, 90 seconds by default, and as long again for a dialog end the bank left unanswered. The client stops waiting then also for a transport that ignores the trigger -
FinTsTransport.posttakes anabortTrigger, aFuture<void>as package:http'sAbortableRequesttakes it, which the client completes once the timeclose()gives the request is up. Every implementation must add the parameter to itspost; the client stops waiting for one that ignores it all the same.HttpTransporthands it to its HTTP client and stops waiting once it completes, also where the client does not take package:http'sabortTrigger, and the request fails with aFinTsTransportException'Request aborted'. Each request gets a trigger of its own, so that closing one client aborts none of the requests of another that shares itsHttpTransport.HttpTransportended a request at its timeout only -
HttpTransport.close()closes its own HTTP client once the requests on their way are over, so that a client that shares the transport with one that is closed still gets the answer to its request on its way. It closed the HTTP client at once, which broke off that request. Once those requests are over, a request posted through the transport fails where it has its own HTTP client, as it did, so give each client a transport of its own -
At most 3 further pages of a query may ask for a TAN or an app approval, as its first page may, which serves a bank that asks once on a later page or on every page of a query of up to four pages; an app approval counts once, however many status requests it takes. Where a fourth asks, the call fails with
FinTsProtocolException, which asks for a shorter period, without asking the user, and the client ends the dialog, so that the next call logs in anew. Each page asked the user anew, up to 1000 times for one query, and a cancel lost the pages already approved -
An answer to a TAN or an app approval that asks for an approval once more (
0030,3955) fails the call withFinTsProtocolException, and the client ends the dialog. It was read as done: as a login without user parameter data, as an order without data, such as no transactions, or, for a3955status answer, as the approval, and the dialog stayed open -
An answer must belong to the message the client sent: its header and trailer carry the number of that message, and its dialog ID, once the bank has assigned one, and the message it refers to (Bezugsnachricht) are those of that message; in FinTS 4.1 its header carries the number of the message and, where it states them, the user and bank references of the dialog. Any other answer fails the call with
FinTsProtocolExceptionbefore anything of it is kept, and the client ends the dialog; at login it counts as a login whose answer the client could not read. The client took any answer for the one to its message, so that a relay or proxy that mixed up answers handedgetBalanceandgetTransactionsthe balance and transactions of another user, under the account the app had asked for, without error -
A FinTS 3.0 answer must be one complete message, framed as the specification asks: a binary length of anything but digits, binary data that reach beyond the message or are not followed by a separator, text that starts with an unescaped
@, an escape character at the end, a last segment without terminator (also inside the encrypted part and in the saved parameter data), two messages run together and an encrypted part (HNVSD) without binary data fail withFinTsProtocolException. The client read a binary length in hex, with a plus sign or with blanks, such as@0x3@, as that number and any other malformed or overlong one as text, dropped the bytes after binary data, which could swallow whole segments, dropped an escape character at the end and an unterminated last segment within the encrypted part, merged two messages run together unless both were encrypted, so that another dialog's answer appended to the real one added its transactions, and read an empty encrypted part as an answer without segments -
A FinTS 3.0 answer in base64 is read as UTF-8, so that one after a UTF-8 byte order mark, as .NET and Java servers may write it, or one with Unicode blanks such as a no-break space or U+3000 between its characters is read. It was read as ISO 8859-1, so that such an answer failed with
FinTsProtocolException'Malformed bank data: Not a FinTS message: no message header', while a lone byte 0xA0 counted as a blank; now that byte fails the answer -
In FinTS 3.0 parameter data, an integer counts only in decimal digits, with an optional sign and blanks around, and within ±(2^53 - 1), as a JavaScript number holds it exactly; one in hex, such as
0x10, or beyond those bounds counts as not stated: a segment version, the version of the bank or user parameter data, which the client then reports as 0,Account.typeCode, theTanMethodlengths, counts and polling parameters, the PIN lengths, the maximum message size and timeouts and the dialog language. An integer in hex was read as such: a maximum message size of0x10refused every message above 16 KB, a process variant0x1marked a TAN method as one the client cannot run, and a polling parameter0x10waited 16 seconds -
getBalancefails withFinTsProtocolExceptionwhere the balance the bank returns names another account than the one asked for, also where it returns a single one, and so doesgetTransactionsin camt where an answer (HICAZ, FinTS 4.1AcctMvmtsSpecifiedPeriodCamt) names another account or none; MT940 is not checked, since banks write its account line (:25:) in many ways. A single balance was taken as it was, and camt transactions were read without a look at the account they name, so that another account's were returned as those of the account asked for -
A SEPA account list the bank answers by ending the dialog counts as rejected at once: the call goes on without it, and only a new client asks again. The next call asked once more, which cost every client of a bank that always ends the dialog in answer another login, and counted only a second such answer as a rejection
-
MT940 statements are checked against their balances:
Mt940.parse, and with itgetTransactions, which fails withFinTsProtocolException, rejects a statement whose transactions do not lead from its opening to its closing balance, one that states only one of the two, one of them, its account (:25:), its number (:28C:) or its creation date (:13D:) twice, balances in another currency than the statement, and a balance or creation date it cannot read. Where a bank wraps:86:at a fixed width, a payer could start a line of a purpose with:61:…,:25:…or:13D:…and so add a transaction of any amount, replace the account or move the booking year, without error: each of these fields overwrote the one before, an unreadable balance or creation date was skipped, and the balances were never compared. The check misses such lines that add up to nothing, and statements without balances, such as pending transactions (MT942) -
Mt940.parsethrowsFormatExceptionfor text that holds no field, such as-or a bank's error text, also where it is only the pending part ofgetTransactions; blank text still gives no statements. It returned no statements, so thatgetTransactionsgave fewer transactions or none, without error -
A camt document without any report, statement or notification (
Rpt,Stmt,Ntfctnin the message of the document, as ISO 20022 places them) is malformed:Camt.parseTransactionsthrowsFormatException, andgetTransactionsfails withFinTsProtocolException. Such a document passed as one without transactions, and the entries in a document of another shape, such as<Document><Ntry>, counted -
XML from the bank is read as XML 1.0 requires, in camt documents and FinTS 4.1 answers: a document type declaration, an entity reference other than a character reference or one of the five predefined ones, a character reference to no character (
�, half a surrogate pair, beyond Unicode, or with a sign, blanks or a capitalX), an attribute without a quoted value or stated twice,<in an attribute value, text or CDATA outside the root element and an XML declaration anywhere but once before it are malformed (FinTsProtocolException, orFormatExceptionfromCamt). package:xml took them: unknown and unterminated references stayed in the text as written, such as a currency€,�gaveNUL,Ccy=EURandCcywithout value gave the currencyEURand an empty one, the first of two attributes counted, and a document type declaration was skipped -
The XML declaration of camt documents and FinTS 4.1 answers,
<?xmland a blank or?>, ends at its first?>, and what it states is not read, as in fints-ts. package:xml read its attributes up to the?>after the last of them, so that<?xml version="1.0" encoding="?><Evil/><?x "?>hid the element<Evil/>, which is now a root element of its own: a document after it has two and is malformed (FinTsProtocolException, orFormatExceptionfromCamt) -
An empty element counts toward the 100 levels an XML document from the bank may nest, as the same element with an end tag does:
<b/>inside 100 open elements is malformed (FinTsProtocolException, orFormatExceptionfromCamt). It did not count, so that such a document passed -
The
FormatExceptionof malformed XML, in camt documents and FinTS 4.1 answers, names the first fault in the document, one in its nesting included, and, unless it is in an entity reference, the fault's position, whichFormatException.offsetholds as well: 'Invalid XML: unexpected end tag b at position 7' for<a></b>, 'Invalid XML: elements nested deeper than 100 levels at position …' and 'Invalid XML: more than 500000 nodes at position …'. The faults package:xml found read 'Invalid camt document: …' or 'Invalid XML response: …' in package:xml's words, a fault in the nesting was reported after the others, and the limits read 'XML nested more than 100 levels deep' and 'XML with more than … nodes' -
A camt date, and a FinTS 4.1 time, with a UTC offset beyond ±14:00, such as
+14:30, or with24:00:00and a fraction of a second other than zero, such as24:00:00.5, is unreadable, as XML Schema has it:Camt.parsethrowsFormatException,getTransactionsfails withFinTsProtocolException, and a FinTS 4.1 time counts as missing. An offset up to ±14:59 was read, so that2024-03-15T10:00:00+14:30was dated 14 March, and24:00:00.5was midnight of the next day -
A query that would build more than 200,000 statements and transactions, booked and pending together, fails with
FinTsProtocolException, and so doMt940.parseandCamt.parsewithFormatExceptionpast 200,000 in one parse: ask for a shorter period then. A camt batch booking of several transaction details counts once as a whole and, where every detail states its amount, once more for each detail. The parsers built them all, so that a hostile answer within the bounds of a query, such as an MT940 page of 16 MiB with some 700,000 transactions, could exhaust the memory -
Camt.parsereads the credit/debit indicator and the dates of a camt entry before the value of its amount, and reports a fault in them first, also in an entry beyond the 200,000 statements and transactions. It reported a fault in the amount's value first -
A SEPA keyword in the text the payer or the payee writes, from the first
SVWZ+,ABWA+orABWE+on, is part of that text, and a keyword that occurs twice has no value, inSepaPurpose, MT940 and camt: the purpose then is the whole text. ACRED+,MREF+,EREF+orIBAN+the payee wrote after the bank's value replaced it, so that a direct debit could come with the creditor ID of a creditor the app trusts and an MT940 transaction with an IBAN the payer chose; of a keyword that occurred twice, the last counted -
The
EREF,MREFandCREDof a camt transaction'spurposeCodescome from their elements only (EndToEndIdunlessNOTPROVIDED,MndtIdand the creditor ID), never from the remittance text, which the payer or the payee writes; with the elements they stand where the text names them, and after its keywords otherwise. Where the bank stated no element, the keyword of the text stayed, so that a payee could pose as a creditor the app trusts -
In FinTS 3.0,
FinTsFeedback.parameters, and with them the new login data ofFinTsLoginDataChangedException, andTanChallenge.referencehold one character per byte the bank sent (ISO 8859-1, the FinTS character set), as the client sends them back: text a bank sends there in UTF-8, such asMüller, reads as ISO 8859-1 shows it (Müller). They held the text decoded as UTF-8 where it was valid UTF-8, so that a position to continue at or a TAN order reference went back in other bytes than the bank had sent -
TanImage.tryParse, and with itTanChallenge.image, takes PNG, JPEG, GIF, WebP and BMP images only, their MIME type in any case, andTanImage.mimeTypeis in lower case then. It took anyimage/type, SVG included, which may carry scripts that run where an app shows the image as a document; refusedIMAGE/PNGandImage/Png; and keptimage/PNGas the bank wrote it. An alias such asimage/jpgorimage/x-pnggives no image now -
FlickerCode.parserefuses a code that would not render as the bank sent it, so thatTanChallenge.flickerCodeisnullfor it: one with characters after the length it states, a data element length of 0 or above 63, data other than printable ASCII, or more data than its length fields can state, more than 15 bytes in an element in HHD 1.3 or 255 bytes in all. Such a code was shown altered on the TAN generator: with an empty element, a length masked to six bits, the characters after its length dropped, a character beyond ASCII sent as one byte or as two, or a length that overflowed its field. HHD_UC data are read as the challenge text is, blanks and line breaks left out; a byte outside printable ASCII anywhere in them gave no flicker code -
In FinTS 4.1,
TanMethod.maxTanLengthcomes from the method's two-step parameters (LenInpChallenge, the longest input the method takes), as in FinTS 3.0, and fromMaxLenTANonly where they leave it out. It came fromMaxLenTAN, the counterpart of a field of the FinTS 3.0 PIN/TAN parameters (HIPINS) that the client does not read -
Bank parameter data from the anonymous dialog serve only until a dialog signed with the PIN brings the user's: until then, the client reports version 0 for them, so that the bank sends its parameter data anew (PIN/TAN B.4.3.1); in FinTS 4.1 it leaves out
BpdVersion, as it does without parameter data. It reported their version, so that the bank never sent the user's: where the anonymous ones lacked the two-step TAN methods, as a bank that rejects the anonymous announcement of strong authentication may send them, the client logged in with the one-step method, which PSD2 banks refuse; where they lacked the PIN/TAN parameters (HIPINS), it sent orders without the TAN the bank asks for and did not check the PIN's length.client.statekeeps where they came from; the bank parameter data of a state saved by 0.2.0 or earlier count as anonymous ones, so that in FinTS 3.0 the bank sends them anew, once, at the next login -
An account the app builds itself, such as
Account(bankCode: …, iban: storedIban), goes out as the bank knows it:getBalanceandgetTransactionstake the account ofgetAccountsit matches, by IBAN or else by account number, send the account number, sub-account, IBAN and BIC the bank states of it, take its currency for statements that state none, and check the query against the transactions the bank permits for that account. Only IBAN and BIC were filled in, from the SEPA account list, and not at all where the app gave both: an account built from its IBAN went out without the account number a national account takes (FinTS 3.0HKSALandHKKAZversion 6, FinTS 4.1AcctBalandAcctMvmtsSpecifiedPeriodversion 1), in FinTS 4.1 even without its IBAN where neither the app nor the SEPA account list gave its BIC, and escaped the permission check where the user parameter data name accounts by number (HIUPDversion 5); one built from its number went out without IBAN and BIC where the user parameter data state them, as the account extension does; a changed BIC or a padded account number went out as the app had stored it. The check uses the bank's lists for the account the client can link the app's account to: one only the SEPA account list names lists none, so that only the bank can tell, as where FinTS 4.1 user parameter data name an account by number and the list by IBAN and BIC, without its number. To tell which account it is, the call asks for the SEPA account list wheregetAccountswould, also for an account with IBAN and BIC, for which it did not ask: once per version of the user parameter data where the bank names accounts in the list, and again in each client where the bank sends user parameter data of version 0 or none, rejects the list, ends the dialog in answer to it or names none -
Accountkeeps IBAN and BIC in their electronic format, without blanks, U+0085 (NEL) among them, and in capitals, however the app writes them; blanks alone arenull. An account the app built with its IBAN as printed, in groups of four, or in small letters matched none the bank had named, so that the client sent queries the user parameter data rule out instead of failing withFinTsUnsupportedException, asked for a balance the account extension carries, lost the currency the user parameter data state, and sent the IBAN as written, a NEL as the byte 0x85 -
On the web, a zero debit is zero:
Amountstores 0 for negative zero, as of-0,00, of0,00with a debit mark in MT940, camt or a FinTS 3.0 balance, or of-Amount(0, 2, 'EUR'), and an integer-0in the FinTS 3.0 parameter data reads as 0. Such an amount was negative zero, which differed fromAmount(0, 2, 'EUR')in==,compareTo, sets and hashes, and whichjsonEncodewrote as-0.0 -
A SEPA account list that names no account is kept for the client that read it only, as a rejected one is, and not in the saved
state: the next client asks again, also where a state saved by 0.2.0 or earlier holds such a list. Saved, the empty list of a single faulty answer kept every client restored from the state from asking again, and left the accounts without BIC, until the bank changed its user parameter data; with the change above, it would also leave an account the app builds from its IBAN named nowhere where the user parameter data name accounts by number -
New login data in the answer to a login that asks for a TAN or an app approval end the dialog before the user is asked. The client asked first, and where the approval then failed, such as for a TAN the bank rejected or the user cancelled, the next call logged in again with the old data
-
A wrong PIN the bank reports in its answer to the end of a dialog refuses the login, as anywhere else, and is kept in
client.state; any other error in that answer still counts for nothing. The answer went unread, so that the next call logged in with the PIN the bank had called wrong -
A call sends at most three logins the bank refuses: another TAN method and a new customer system ID count once per call each, also in
getTanMedia, which may log in twice. They counted once per login loop, so thatgetTanMediacould send four -
The client lets go of the PIN once closed, and once a refused login outlasts the call that met it, also one restored from
client.stateand the client's own refusal after two unread logins, untilclearLoginRefusal. A Dart string cannot be wiped, but nothing in the client can sign with it then. It kept the PIN for its whole lifetime -
While the client polls for an app approval by itself, a status answer with new instructions replaces the open prompt: the callback gets the next
attemptwith them, the earlier prompt'sTanChallenge.resolvedcompletes before, and that prompt's answer no longer counts. New instructions reached the user only in the prompt shown after a report of the approval, never where the user cannot report it (manualConfirmationfalse), and theresolvedof every prompt completed only at the end of the wait. Close only the prompt whoseresolvedcompleted, as the README says -
The client lets go of a TAN prompt once its
TanChallenge.resolvedcompletes, also where the callback never returns, as a prompt does that closes onresolvedbut never completes itsCompleter. It held such a prompt, and through it the approval, untilclose(), so that a long-lived client kept one for each app approval -
getTanMediaasks the bank unless the same call has just looked the media up to choose the medium, so that it shows a medium registered since. The list of a lookup that found no active medium is handed out by every call, untilselectTanMethodorclearLoginRefusal, and a TAN method the session switches back to after a refused login has its media looked up anew. The nextgetTanMediareturned the list of any earlier lookup once without asking the bank, also afterselectTanMethodhad named a medium; the one after it failed withFinTsUnsupportedExceptionwhere the lookup had found no active medium; and a method switched back to failed every call untilselectTanMethod -
FinTS 3.0 polling parameters of an app approval (
HITANS) that state more seconds than aDurationholds, either way, count as the longestDurationof their sign inTanMethod, ±9,223,372,036,854 seconds: for a positive one the client waits a minute before each status request, as for any long wait, and for a negative one it asks the bank at once and then every second, as for any negative wait. Beyond ±(2^53 - 1) they count as not stated, which gives the waits of 2 seconds. They overflowed into aDurationof the other sign, so that the client asked the bank at once and then every second for10000000000000and9223372036854775807, and waited a minute each time for-9223372036855 -
Parameter data come only from the answers to a dialog's opening: the login, which may be the synchronization, and its approval. Bank and user parameter data and the customer system ID were taken from every answer, also to an order, a further page, an order's approval or the lookup of the TAN media, so that partial bank parameter data a bank repeated there replaced the login's, also in
client.state: the TAN the PIN/TAN parameters ask for an order, or the two-step TAN methods, were gone until the bank changed their version -
User parameter data that name another user ID than
FinTsConfig.userIdare reported as version 0 (in FinTS 4.1 withoutUpdVersion), so that the bank sends the user's anew; a bank that names the user by another ID, such as an alias, sends them at every login. Their version was reported, so that another user's accounts, as where a relay had mixed up the answers to the synchronizations of two users, stayed, also inclient.state -
In FinTS 3.0, a customer system ID the bank rejects (
9391) is dropped together with the user parameter data, which the next login delivers anew. They were kept and their version reported, so that user parameter data that came along with the rejected ID outlived it -
Where the limits of the bank parameter data rule out a login, the client takes only the PIN lengths, where the anonymous dialog's parameter data state them (
HIPINS), and the maximum message size from those, and only where their version differs from that of the kept ones, which stay; until the next login brings the user's, it reports version 0 for them (in FinTS 4.1 it leaves outBpdVersion). The anonymous dialog's replaced the user's, ingetBankInfoandclient.stateas well, though a bank may give a user other ones than it gives anonymously (PIN/TAN B.4.3.1), and parameter data of the version kept, which tell nothing new, let the login go out -
In FinTS 3.0 user parameter data, an account (
HIUPD) is read by position, as account number, sub-account, country and bank code, so that a sub-account or bank code the bank leaves out is empty, except three elements whose second is a country code of three digits and whose third is not, the older layout without sub-account: account number, country and bank code. Three elements were read as account number, country and bank code, whatever they held, so that orders went out with the country code as bank code, such as040of987654321::040, and with a sub-account as country code, such as01of1234567890:01:280; one of two elements lost its sub-account -
The complete balance of the FinTS 3.0 account extension states the account's
productName, as a balance query does. It stated none -
The FinTS 3.0 account extension of the user parameter data reads the time
240000as midnight of the next day, like the other FinTS times. It voided the whole extension, its BIC, complete balance and data status included -
Values the bank issued go back exactly as it sent them: the dialog ID, the customer system ID, the TAN order reference, the position to continue at and the TAN medium name. A medium name a bank sends in UTF-8 whose characters fit ISO 8859-1, such as
Mein Händy, went back in ISO 8859-1, so that the bank did not know the medium and refused the login;client.statekeeps such a name as the bank sent it (tanMediumNames). A value with blanks at either end went back without them, and a customer system ID in UTF-8 was saved decoded -
client.statekeeps the bank and user parameter data in the bytes the bank sent them. They were encoded anew from what the client had read, without needless escape characters and with binary lengths rewritten -
client.stateis read as other JSON tools write it: an integer written with a fraction or exponent, such as2.0or1e0, as stores that keep numbers as doubles write it, counts as that integer, also the count of logins whose answer was lost, while a fraction such as2.5still damages the state; and a saved SEPA account without country code is one in Germany (280). A state with such an account, or on the Dart VM with such an integer, was discarded, at the cost of a new synchronization. On the web, an infinite number such as1e400damages the state, as on the Dart VM, and-0is saved as0: an infinite UPD version of the SEPA account list keptclient.statefrom being saved, and-0was saved as-0.0, which the Dart VM did not read -
A challenge whose
HHD_UCthe bank sends as text rather than binary data takes its flicker code from the challenge text, as one withoutHHD_UCdoes. The text went for theHHD_UC, so thatTanChallenge.hhdUcheld it and a flicker code in the challenge text was lost -
TanChallenge.plainMessagegives in a structured challenge as a no-break space (U+00A0), as HTML defines it and as gives it, so that an amount such as10,00 EURstays on one line, as the bank meant. It gave a plain space -
An HHD 1.4 flicker code with three-digit data element lengths, as some banks send them, is read with three digits also where two-digit ones would fill its stated length. It was read with two, so that the TAN generator showed and signed other data than the bank meant, such as an empty first element and the second one cut differently
-
TanImage.toDataUrl()gives the image as adata:URL, for thesrcof an<img>only. There was none -
A transport's error passes on its message only:
FinTsTransportExceptionkeeps the message of aFinTsException,ClientException,FormatException,StateError,ArgumentError,UnsupportedErrororTimeoutException, or the name of its type where that message is empty; that of aSocketExceptionorTlsExceptionwith the message of its OS error where that says more, also where package:http wraps theSocketExceptionin itsClientException, as inFailed host lookup: 'bank.example': nodename nor servname provided, or not known; that of anHttpExceptionwithout its URL, and without the bytes written, the request included, that dart:io adds to 'Content size exceeds specified contentLength', also where package:http wraps it in itsClientException; a thrownString, and anException('…')as it prints, such asException: relay broke; and of an error of any other type only the type, such asInstance of 'RelayError'for a class of the app's own that implementsException, since itstoStringmay print the request. It kept the wholetoString, with the type, aFormatException's source, aClientException's URL and whatever else an error prints, such as the request with PIN and TAN;HttpTransportlet anErrorof its HTTP client through, and kept only the message of aClientExceptionthat wraps aSocketException, such asFailed host lookup: 'bank.example' -
HttpTransportrejects the answer of an HTTP client that followed a redirect all the same, or that answers from another URL (BaseResponseWithUrl), since the request, PIN included, may have gone to another address. It compares both URLs as WHATWG URL writes them, which is how a browser gives the URL of an answer, so that the answer tohttps://bank.examplefromhttps://bank.example/is the bank's. It took a redirected answer, or one from another URL, for the bank's -
In a browser,
HttpTransport's own client sends withfetchitself rather than package:http'sBrowserClient, also in place of aBrowserClientthatrunWithClientsets, unless that one sends credentials (withCredentials) or is of a subclass; a client of another class, and one passed toHttpTransport, is used as it is. It gives the HTTP status of an answer whose Content-Length is no number, such asabc, or8, 8for two headers, and reads such an answer within the size limit; a Content-Length of more digits than anintholds counts as too large, as in dart2js, also with dart2wasm.BrowserClientfailed with 'Invalid content-length header' before the status was seen, so that an HTTP 500 to the anonymous request for the bank parameter data had nostatusCodeand did not go out once more withoutHKTAN, and a 200 answer was lost. A redirect fails with 'The server redirects the request, which the client does not follow'; it failed with the browser's 'Failed to fetch'. package:web, which package:http used already, is now a direct dependency -
HttpTransportreports the HTTP status, the size limit or the redirect for which it rejects an answer also where cancelling the rest of the body fails, as it does for an answer cut off in a browser. The error of the cancel, such as 'network error', took the place of the reason, so that an HTTP 500 to the anonymous request had nostatusCode -
The
FormatExceptions ofMt940,Camt,Amount.parseDecimalandFlickerCode.parseprint their message only:toString(), and with itprint(e)and'$e', leaves out the bank data they keep insource, such asFormatException: Invalid amountfor1.234,56.toString()printed thesourceafter the message: the:61:line, balance, creation date or statement reference, the amount, the flicker code, which holds account data and amounts, or the camt value. The errors of an MT940 statement's structure, such as two accounts or transactions that do not add up to the closing balance, keep the statement's reference (:20:) insource, 'Unreadable MT940 balance' keeps the field, and an unknown entity or a character reference to no character in XML keeps the reference, such as€ -
Two messages read otherwise: a negative amount next to a credit/debit mark fails with 'Negative amount with a credit/debit mark', in camt with 'Negative camt amount', and a FinTS 3.0 answer with two encrypted parts with 'More than one encrypted part (HNVSD)'. They read 'Negative amount besides its credit/debit mark' and 'More than one encrypted part'
-
TanMedium.toStringshows the medium class, or the last digits of the card number, and the status by its name, such asTanMedium(M, active), never the name, which the user may have given the medium after themselves, such asMax’s iPhone. It showed the name wherever the bank stated one, and the status asTanMediumStatus.active -
FinTsFeedback.toStringshows the return code only, such asFinTsFeedback(3072), andBankMessage.toStringshowsBankMessage(…), so thatprint,'$f', logs and crash reports of warnings, refusals and bank messages collect none of the bank's texts and parameters. They showed code, text and parameters, such as the new login data of return code 3072, and subject and text, which may name the user. Showcode,textandparameters, orsubjectandtext, to the user; the message of aFinTsBankExceptionstill names its errors with the bank's texts and parameters, such as '9010: Konto gesperrt [DE89370400440532013000]' -
The 128 MiB bound of a query holds for the last or only page too, and is checked before the position to continue at. It was checked only after a page that announced another, so that a last page could take a query past the bound
-
MT940 lines are separated by
@@wherever the first line of the data holds it, also where the data break the line between statements or at their ends, andgetTransactionsdecodes each page on its own. A single line break, such as a CRLF after the last statement, made every@@text: the first field took in the rest of the data, so thatgetTransactionsreturned no transactions without error, or failed withFinTsProtocolExceptionwhere that field exceeded 65,536 characters; a page in another encoding than the first garbled the others, and one that started with a byte order mark of its own merged its first field into the purpose before it or lost its first transaction -
A structured
:86:field is one whose subfields start with?. Any punctuation after the three-digit code counted as the separator, so that free text such as100,00 EUR Mieteor100/2024 Beitraglost its purpose or had it cut -
camt entries count only right in a report, statement or notification, transaction details only in
NtryDtlsand purpose lines only inRmtInf, as ISO 20022 places them. An entry wrapped in another element, beside the report or in its group header became an extra transaction, a detail directly in the entry or in aBtchfilled in the counterparty or split the booking, and the purpose took theUstrdlines anywhere in the detail, nested details' ones included -
The creditor ID of a camt transaction is the creditor's only: the
SEPAidentification right inCdtr/Id/PrvtIdorCdtr/Pty/Id/PrvtId. It was the firstSEPAidentification of any related party or account, so that the initiating party, the debtor or the ultimate debtor or creditor, written before the creditor, set it, as did an organisation identification (OrgId) -
camt purpose lines of 35 characters or more, blanks included, go on in the next line as they are, maybe before a blank; any other line ends a phrase, which the next one follows after a blank. Each line was trimmed before the cut was decided, so that a blank at the start of the next line or at the end of a 35-character line was lost and merged two words, such as
KundeandNr 4711intoKundeNr 4711, and a blank followed a longer line -
Camt.parsegives each report, statement or notification of a camt document as aCamtStatementwith its reference, account (IBAN or other identification) and currency, so that an app importing a camt.053 file of several accounts does not book one account's entries on another. There was none
0.2.0 #
Fixes from a security review. An app may notice three changes: after two logins in a row whose answer the client could
not read, it refuses to log in itself until a new client is created; more malformed bank data raises
FinTsProtocolException instead of being read as something else; and a call running when close() is called fails with
StateError, also where its last answer was already on its way.
- A synchronization the bank refuses for the one-step method is repeated with a two-step method after a
3920only where the bank names no other error than9050or9800. Banks never list the one-step method in3920, so a3920next to another error, such as9941"Signatur ungültig", sent a wrong PIN twice close()stops a running call at its next message: after the request on its way, the call sends nothing but the end of its dialogs, and fails withStateErroralso where that request was its last, unless that request failed. A call still setting up the session went on with the synchronization, the lookup of the TAN media and the login, all signed with the PIN, and the login could send the user a TAN or an app approval nobody would answer- Bank data that would take hours, gigabytes or the whole stack to read is malformed (
FinTsProtocolException, orFormatExceptionfromMt940,CamtandAmount.parseDecimal): a FinTS 3.0 message of more than 1,000,000 data elements and segments or with more than one encrypted part, an XML document of more than 500,000 nodes besides text or one per 16 characters, whichever is more, or one nested more than 100 deep, an MT940 field of more than 65,536 characters and an amount written with more than 64 characters. Such data from a broken or hostile server blocked the app for minutes to hours, took 1 to 4 GB of memory, or failed withStackOverflowError, which an app that catchesFinTsExceptiondoes not handle - The 128 MiB a query may hold count each data element or XML node of its pages as 512 bytes, more than any of them takes once parsed. They counted the bytes received, so that many pages of short elements took gigabytes
- Bare
&in XML, line breaks inside an MT940 field, repeated MT940 subfields, a long FinTS 4.1 namespace, a camt entry with many transaction details, long lists of TAN methods and the matching of tens of thousands of accounts with the SEPA account list take linear time: 400,000&took 40 seconds, 40,000 line breaks 13 seconds, and the accounts 105 seconds on everygetAccounts. Elements nested in others of their name, such as a camt entry in an entry, are read once instead of once for each one around them, andMt940.parseTransactionsno longer keeps every statement, which took 4 GB for 128 MiB of empty ones - Account numbers, HHD_UC data, FinTS 4.1 parameter names and the namespaces of
FinTs4Client.queryVersionsare read without patterns that exhaust the stack on several megabytes, and a structured TAN challenge of more than 65,536 characters stays unformatted inTanChallenge.plainMessage HttpTransportcopies each part of a response as it arrives, and refuses a response that announces more thanmaxResponseByteswithout reading it. It kept the parts dart:io hands out as views into its read buffers, so a server that sent 15 MiB in one-byte parts took about 1 GB of memory, despite the limit meant to prevent that- The maximum message size and the timeouts of FinTS 3.0 bank parameter data count as not stated above 9999, the four digits HIBPA allows, and a message is compared with the maximum size in whole kilobytes. Larger values overflowed: from 2^53 KB on every message was refused, also with the saved state, so the client could never reach the bank again, and a timeout above about 9.2 trillion seconds made every call log in anew and ask for another TAN
- An MT940 booking date, which states only month and day, gets the year that places it within its statement, between
the dates of the opening and the closing balance; where one of them is missing, as in an MT942 with its creation
date
:13D:, the period reaches the value date on that side. It got the year of the value date, moved only between December and January, so that a refund or correction booked in January 2026 with the value date of a debit from months before showed as booked in January 2025. A statement whose closing balance is dated before its opening balance, or whose creation date cannot be read, is malformed - An amount whose sign the bank sends in a credit/debit mark (a camt entry or detail, a FinTS 3.0 or 4.1 balance, the
balance of the account extension) is malformed if it is negative; the account extension is ignored as a whole then.
The mark negated such a value once more, so that
-50.00with a debit mark read as a credit of 50.00 - A camt batch booking is split into its transaction details only where they add up to it in its currency, and stays one booking otherwise, as where a detail lacks its amount: charges booked with the batch, or a detail in another currency, were lost from the transactions or changed their currency
- A camt booking or value date given as date and time with
Zor a UTC offset is the day in Germany at that moment, and a FinTS 4.1 time with one, such as the end of a TAN challenge or the time of a balance, is the moment it names. Both were read as German time, so that a booking at 23:30 UTC counted on the day before and a time in UTC was one or two hours off.24:00:00is midnight of the next day. A camt date the client cannot read, such as one with the offset+0100, is malformed instead of being read as German time, and a value date is never silently the booking date; a FinTS 4.1 time in such a form counts as missing - A FinTS 3.0 message that does not end with the message end (HNHBS), or whose encrypted part is no binary data, is malformed. A response cut off in transit, which dart:io hands over as complete where the bank states no length and the TLS connection ends without close_notify, was read as a whole one: the segments after the cut, the return codes of a cut encrypted part, or whole accounts and pages of transactions went missing without an error
TransactionFormat.autotakes camt.052 where the bank offers it and MT940 cannot be requested for the account. Where incomplete user parameter data listedHKKAZbut notHKCAZ, it chose MT940 and failed withFinTsUnsupportedExceptionif the bank offered noHKKAZversion the client implements- A challenge in the dialog that looks up the TAN media gives
TanChallenge.tanMediumNameasnullwhere the bank names no medium. It gave the placeholdernorefthe client sends there, as FinTS 4.1 did whenever the bank asked for strong authentication in that dialog - A login whose answer is lost, times out or cannot be read, such as an HTTP error, a web page in place of the answer or
an encrypted FinTS 4.1 answer, counts until a login the bank takes: after two such logins in a row the client refuses
the login itself, and every later call that would send the PIN fails with a
FinTsBankExceptionwithout return codes. The bank may have counted such a login as a failed attempt, and an app that retried sent the PIN again on every call. The client cannot tell a login that never reached the bank from a lost answer, so a connection that fails twice in a row has the same effect - The bank's limits on the PIN's length apply to logins only, not to the later messages of a dialog the bank has opened
with that PIN, and where the bank parameter data rule out a login, by the PIN's length or the message's size, the
client fetches them anew in an anonymous dialog before it fails (a bank that does not answer anonymously cannot
refresh them). Saved limits never changed, since new ones come only in answer to a login: after the bank had raised
its limit for a longer PIN, every call failed with
ArgumentErrorwithout contacting the bank until the app dropped its saved state. A synchronization that brought the first parameter data, which ruled out the PIN, failed its own dialog end, and the dialog stayed open at the bank - The answers of a FinTS 4.1 bank reach
loggerwith the content of every element calledPINorTANreplaced by***, found by the structure of the XML rather than a pattern, as is such markup quoted in text, and an answer that is not XML the client can read as a placeholder. The pattern missed a PIN the bank echoed as<PIN xmlns="…">, in CDATA or with a prefix such asfints-msg:, and every TAN it echoed, which reached the log in clear text - A camt document or FinTS 4.1 message declared as Windows-1252 is decoded in about four times its size in memory. It went through a list of every byte: a 16 MiB document raised the app's peak memory by 480 MiB
- On native platforms, the default
HttpTransportsends plain http, whichallowInsecureUrlallows to loopback addresses only, to the address directly, past any proxy. It followedHTTP_PROXY, so that where the environment named a proxy without exemptinglocalhost, as on many company machines, a login tohttp://localhostwent to the proxy with the PIN unencrypted. Plain http also bypasses a client set withrunWithClient, which may follow the proxy as well. https still followsHTTPS_PROXYandNO_PROXY, and a client passed toHttpTransportis used as it is
0.1.2 #
- Link the homepage coderoftime.dev and the repository's new location in the pub.dev listing
- Require Dart 3.11, the lowest SDK that package:xml 7 supports (0.1.0 and 0.1.1 claimed 3.8 but could not be resolved below 3.11)
0.1.1 #
- Make repository and issue tracker appear in pub.dev listing
- No code changes included
0.1.0 #
First release.
- FinTS 3.0 and 4.1 PIN/TAN clients (
FinTs3Client,FinTs4Client): accounts, balances and transactions (camt.052 and MT940/MT942), with paging and SEPA account details. - One-step and two-step TAN, PSD2 strong customer authentication and decoupled approval (pushTAN, SecureGo plus);
TAN method and medium selection, chipTAN flicker codes and photoTAN images. The TAN callback answers with a
TanAnswer. - Bank parameter data, customer system ID and the chosen TAN method are kept in an exportable state string, which holds neither PIN nor TAN.
- A client never sends its PIN again once the bank has refused a login, so that a retrying app cannot lock the access; see the README for the return codes after which it logs in once more. An error in the TAN or app approval of a login, such as an expired TAN, is not a refused login, and a login that would lack a required TAN medium is not sent at all.
- The bank's warnings reach the app through
onWarning, apart from those the client acts on itself. New login data (3072) end the dialog and fail the call and all later ones withFinTsLoginDataChangedException, which names them. - An error thrown by
onBankMessage,onWarningorloggerfails the call once its exchange with the bank is over. - https only, no redirects, bounded request time, response size and query size; PIN and TANs are masked in the log,
along with the sizes that would tell their length, and
toStringof the models leaves out account data. - Follows the parameter data: sends only what the user parameter data and HIPINS permit, takes BIC and complete
balance from the account extension of the user parameter data and passes its data status on
(
Account.dataStatus, withmt940TransactionsIdandcamtTransactionsId), checks the PIN length before the first message signed with it, and logs in anew after a dialog was idle for longer than the bank's maximum timeout. - Parsers for MT940 (German structured
:86:fields and SEPA keywords) and camt.052/053; malformed bank data raiseFinTsProtocolExceptioninstead of being guessed, as does a request for a TAN or an app approval without a challenge, after which the bank has not executed the order.