From: Henryk Plötz Date: Sun, 27 Jan 2019 12:47:46 +0000 (+0100) Subject: Implement parsing a PNG QR code in HITAN3.challenge in CHLGUC member (instead of... X-Git-Tag: v2.1.0~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F54%2Fhead;p=thirdparty%2Fpython-fints.git Implement parsing a PNG QR code in HITAN3.challenge in CHLGUC member (instead of flicker code data). Sparkasse does this for the new 913 "chipTAN-QR". --- diff --git a/fints/client.py b/fints/client.py index 8bc225c..ba3f22a 100644 --- a/fints/client.py +++ b/fints/client.py @@ -1,6 +1,7 @@ import datetime import logging from abc import ABCMeta, abstractmethod +from base64 import b64decode from collections import OrderedDict from contextlib import contextmanager from decimal import Decimal @@ -943,6 +944,10 @@ class NeedTANResponse(NeedRetryResponse): self.challenge_hhduc = self.challenge[12:(12+int(l,10))] self.challenge = self.challenge[(12+int(l,10)):] + if self.challenge_hhduc.startswith('iVBO'): + self.challenge_matrix = ('image/png', b64decode(self.challenge_hhduc)) + self.challenge_hhduc = None + if self.challenge.startswith('CHLGTEXT'): self.challenge = self.challenge[12:]