Skip to content

Send empty tan_medium_name instead of "noref" when none is offered#141

Open
guidoffm wants to merge 2 commits into
hbci4j:masterfrom
guidoffm:master
Open

Send empty tan_medium_name instead of "noref" when none is offered#141
guidoffm wants to merge 2 commits into
hbci4j:masterfrom
guidoffm:master

Conversation

@guidoffm

@guidoffm guidoffm commented Jul 9, 2026

Copy link
Copy Markdown

Problem

When a bank's BPD indicates a TAN medium name is required (needtanmedia=2) but
reports no named options to choose from, AbstractPinTanPassport.getTanMedia()
falls back to sending the literal string "noref" in the TAN medium name field.

At least Taunussparkasse (BLZ 51250000, Finanz Informatik) rejects this with:

9050 - Die Nachricht enthält Fehler.
9800 - Dialog abgebrochen
9955 - Auftrag nicht ausgeführt - Die Gerätebezeichnung ist unbekannt. (MBV...)

An empty value in the same field is accepted instead - this also matches what
python-fints sends in the equivalent field for the same bank, confirmed via a
side-by-side raw HBCI segment comparison (tan_medium_name = '' there vs.
"noref" here).

Fix

Return an empty string instead of "noref" when no TAN medium name is
available. Verified end-to-end against Taunussparkasse: balance and full
transaction history now retrieved successfully (previously failed on every
attempt with the error above).

Testing

Reproduced and fixed against a real Taunussparkasse account via HKIDN/HKVVB/
HKTAN (pushTAN 2.0, decoupled). Happy to add more detail/logs if useful for
review, redacted as needed.

guidoffm added 2 commits July 9, 2026 16:16
Taunussparkasse (BLZ 51250000) rejects the literal string "noref" with
"9955: Die Geraetebezeichnung ist unbekannt", but accepts an empty
value in the same field - matching what python-fints already sends.
@willuhn

willuhn commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Ich bin nicht sicher, ob ich das einfach so pauschal ändern kann. Das würde alle Banken betreffen und das derzeitige Verhalten wurde ja explizit nach Experimenten mit mehreren Banken bei der Einführung von PSD2 so herausgefunden und daraufhin angepasst. Ich habe den Fall mal im Forum unter https://homebanking-hilfe.de/forum/topic.php?t=28378 gepostet, um zu erfahren, wie andere den Fall handhaben.

@guidoffm

Copy link
Copy Markdown
Author

Der PR wurde von Claude in meinem Auftrag erstellt. Ich vermute ja, dass die Taunussparkasse mit anderen Sparkassen zusammen denselben Provider hat. Und dann sollte das Problem auch woanders auftreten.

@willuhn

willuhn commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Ich habe selbst ein Konto bei der Sparkasse und das Problem tritt da nicht auf. Mir sind auch keine anderen Userberichte zu einem solchen Fehler bekannt.

@guidoffm

guidoffm commented Jul 14, 2026

Copy link
Copy Markdown
Author

Ich habe gerade in der Bankenliste recherchiert, welche Banken dieselbe URL benutzen wie die Taunussparkasse. Es handelt sich um einige hessische Sparkassen (Kassel, Battenberg, Darmstadt-Dieburg, Hanau, Offenbach, Hersfeld-Rotenburg, Giessen), aber nicht um alle.

@willuhn

willuhn commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Ich warte mal noch auf Rückmeldungen aus dem Forum, wie das in anderen Implementierungen gehandhabt wird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants