Description
The password login form in the ondemand theme does not disable the
submit button after submission.
When the form is submitted more than once, the first request completes
successfully, but the second request reuses the consumed authentication
state and returns 400 Bad Request.
Environment
- ondemand-dex 2.45.1
- LDAP connector
- ondemand frontend theme
Observed behavior
The same login URL receives two POST requests:
- The first POST succeeds and returns a redirect.
- The second POST returns 400 with:
invalid 'state' parameter provided: not found
Expected behavior
The login button should be disabled after the first valid form
submission to prevent duplicate requests.
Upstream reference
Dex added duplicate-submit prevention to its default password template
in dexidp/dex#3554:
dexidp/dex@a1748467
The same protection does not appear to be present in:
https://github.com/OSC/ondemand-dex/blob/master/web/templates/password.html
Description
The password login form in the
ondemandtheme does not disable thesubmit button after submission.
When the form is submitted more than once, the first request completes
successfully, but the second request reuses the consumed authentication
state and returns
400 Bad Request.Environment
Observed behavior
The same login URL receives two POST requests:
invalid 'state' parameter provided: not foundExpected behavior
The login button should be disabled after the first valid form
submission to prevent duplicate requests.
Upstream reference
Dex added duplicate-submit prevention to its default password template
in dexidp/dex#3554:
dexidp/dex@a1748467
The same protection does not appear to be present in:
https://github.com/OSC/ondemand-dex/blob/master/web/templates/password.html