diff --git a/modules/bnporc/pp/pages.py b/modules/bnporc/pp/pages.py index 1ff54f17c3b7effcf86f60c9d1af2091014f2d75..3f7e19570a1c32acabf5b5e1b62811c885104d5b 100644 --- a/modules/bnporc/pp/pages.py +++ b/modules/bnporc/pp/pages.py @@ -49,6 +49,9 @@ class ConnectionThresholdPage(HTMLPage): + NOT_REUSABLE_PASSWORDS_COUNT = 3 + """BNP disallows to reuse one of the three last used passwords.""" + def make_date(self, yy, m, d): current = datetime.now().year if yy > current - 2000: @@ -105,7 +108,7 @@ def on_load(self): raise BrowserPasswordExpired(msg) new_passwords = [] - for i in range(3): + for i in range(self.NOT_REUSABLE_PASSWORDS_COUNT): new_pass = ''.join([str((int(l) + i + 1) % 10) for l in self.browser.password]) if not self.looks_legit(new_pass): self.logger.warning('One of rotating password is not legit')