Skip to content
SprecherEast
Issue 232

bug: Login and password forms can put credentials in the URL before the page loads

Back to our plan
Done
bugfrontendauthpriority: high

Type

bug

Summary

If the page script has not loaded, the login and password forms submit as a plain GET, which puts the email and password in the URL.

Problem

The shared Form (src/platform/ui/Form.client.tsx, #223) renders a <form> with no method, so the browser default is GET. Before hydration, or when a script chunk fails to load, pressing Enter on /login or /account sends ?email=...&password=.... That URL lands in browser history, server and proxy logs, and the Referer header. Seen in the dev log during the #134 end-to-end run; main behaves the same.

Proposed fix

Give Form method="post" and an action that does nothing harmful without JavaScript (for example the current path, so the server ignores the body), or render the submit button disabled until hydration. Never let credentials reach a URL.

Acceptance criteria

  • Not done: With JavaScript disabled, submitting /login, the password form and /contact never puts field values in the URL.
  • Not done: A test asserts the form method is POST.
  • Not done: Early-typed text is still kept after hydration (#223).

Area

frontend, auth

Priority

high


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab