Skip to content

Password login form allows duplicate submissions #41

Description

@kazeruch

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:

  1. The first POST succeeds and returns a redirect.
  2. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Effort

    None yet

    Impact

    None yet

    Source

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions