Commit 843fadd8 authored by Quentin Defenouillere's avatar Quentin Defenouillere Committed by Romain Bignon

[cragr] Add regexp to login to prevent server errors

On the new cragr website, you cannot POST the login+password with a
space at the end of the password, otherwise the website returns a 500
This commit adds a regexp in to raise an error instead of a
browser unavailable when credentials contain something else than digits.

Closes: 9356@zendesk, 35699@sibi
parent fbd76048
......@@ -84,7 +84,7 @@ class CragrModule(Module, CapBankWealth, CapBankTransferAddRecipient, CapContact
CONFIG = BackendConfig(Value('website', label=u'Région', choices=website_choices),
ValueBackendPassword('login', label=u'N° de compte', masked=False),
ValueBackendPassword('login', label=u'N° de compte', masked=False, regexp=r'\d+'),
ValueBackendPassword('password', label=u'Code personnel', regexp=r'\d{6}'))
BROWSER = ProxyBrowser
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