]> git.ipfire.org Git - thirdparty/python-fints.git/commitdiff
Implement parsing a PNG QR code in HITAN3.challenge in CHLGUC member (instead of... 54/head
authorHenryk Plötz <henryk@ploetzli.ch>
Sun, 27 Jan 2019 12:47:46 +0000 (13:47 +0100)
committerHenryk Plötz <henryk@ploetzli.ch>
Sun, 27 Jan 2019 12:47:46 +0000 (13:47 +0100)
fints/client.py

index 8bc225c686efba639e1bce148cf18fca4a6baea0..ba3f22acb95d2e5f5d763a63e4b56d27ba5033cc 100644 (file)
@@ -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:]