[hsbc] 404 when submitting SCA (regression)
With which module do you encounter problems?
hsbc
Describe the problem you encounter
When submitting the SCA, a 404 error is thrown. Commit b539a4ef seems to have introduced a regression:
@ modules/hsbc/browser.py:221 @ def check_login_error(self):
raise AssertionError('Unhandled error at login: %s' % error_msg)
+ def get_otp_validation_url(self, otp_url):
+ # This method is useful for children modules that don't share the same validation url for otp
+ return self.BASEURL + otp_url
+
def init_login(self):
self.session.cookies.clear()
@ modules/hsbc/browser.py:252 @ def init_login(self):
otp_form = self.page.get_form(nr=0)
self.otp_form_data = dict(otp_form)
- self.otp_validation_url = 'https://www.hsbc.fr' + otp_form.url
+ self.otp_validation_url = self.get_otp_validation_url(otp_form.url)
raise BrowserQuestion(
Value(
'otp',
As self.BASEURL
is not https://www.hsbc.fr
but https://clients.hsbc.fr
Paste here the stacktrace or error message you observe
2022-03-06 20:14:54,112:DEBUG:urllib3.connectionpool:3.1:connectionpool.py:393:_make_request https://clients.hsbc.fr:443 "POST /1/2/!ut/p/z1/***********************************-*****************************-****************************-****************!/dz/d5/***************/?idv_cmd=idv.Authentication HTTP/1.1" 404 1528
In a browser, the SCA is POSTed, as with other authentication steps, to https://www.hsbc.fr
.
What are the steps to reproduce the problem?
I don't have a way to reproduce the SCA prompt (other than waiting multiple days). Command used:
WOOB_USE_OBSOLETE_RESPONSES_DIR=1 woob bank -b hsbc ls --debug --save-response
What woob version are you using?
Output of woob config --version
command:
Woob config v3.1 Copyright(C) 2010-2022 Christophe Benz, Romain Bignon
What module version are you using?
Output of woob config info MODULE_NAME
command:
.------------------------------------------------------------------------------.
| Module hsbc |
+-----------------.------------------------------------------------------------'
| Version | 202104162240
| Maintainer | Romain Bignon <romain@weboob.org>
| License | LGPLv3+
| Description | HSBC France
| Capabilities | CapBank, CapBankWealth, CapCollection, CapProfile, CapDocument
| Installed | yes
| Location | /*********************/weboob/modules/hsbc
| |
| Configuration | login: Identifiant (default: )
| | password: Mot de passe (default: )
| | secret: Réponse secrète (default: )
| | otp: None
| | request_information: None
'-----------------'
How did you install woob?
git + pip
Additional info you'd like to mention
(no thanks :-))