Commit 1c7e9b0b authored by Jerome Berthier's avatar Jerome Berthier Committed by ntome

[banquepopulaire] raise incorrect password if password is not digits only

Currently password with characters breaks the website, it passes
the login but fails miserably.

Moreover from the banque populaire website (https://mobile.rivesparis.banquepopulaire.fr/)

> 15 mai 2019
> ACCÈS À VOS COMPTES
> ​Modification de votre mot de passe
> Pour continuer d’assurer un niveau de sécurité optimum sur l’accès à vos comptes bancaires, vous devez obligatoirement changer votre mot de...
parent 9025264e
......@@ -366,6 +366,12 @@ class Login2Page(LoginPage):
return MyVirtKeyboard(imgs).get_string_code(password)
def login(self, login, password):
# All users must have a password with digits only, else the website is broken.
# It accepts the login but fails miserably, raising a real BrowserUnavailable (like in Firefox)
if not password.isdigit():
raise BrowserIncorrectPassword()
payload = {
'validate': {
self.form_id[0]: [ {
......@@ -387,9 +393,6 @@ class Login2Page(LoginPage):
form_id = (k, v[0]['id'], v[0]['type'])
if v[0].get('virtualKeyboard'):
if not password.isdigit():
# Users who get the virtual keyboard needs a password with digits only
raise BrowserIncorrectPassword()
password = self.virtualkeyboard(vk_obj=v[0]['virtualKeyboard'],
password=password)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment