summaryrefslogtreecommitdiff
path: root/git-hooks/pre-commit
diff options
context:
space:
mode:
authorojacobson <ojacobson@noreply.codeberg.org>2025-07-09 01:21:01 +0200
committerojacobson <ojacobson@noreply.codeberg.org>2025-07-09 01:21:01 +0200
commit948ecc916050a68c2e2ae7f0ddbc56a90db4785f (patch)
treef302b9b489a54a860e67084ac0116bfbd888a245 /git-hooks/pre-commit
parent4eb0cc56696a3805538e5ce6d380ea26e097424c (diff)
parent1286754681cf37a5a01a6a2fcef0fa4a99cc65a9 (diff)
Stop sending `{}` to the `/api/auth/login` endpoint when the login form hasn't been touched.
Steps to reproduce: **Note**: You will need to watch the traffic in a DOM inspector; this has no user-observable symptoms because there's presently no error reporting for the login form. 1. In a new private tab, visit the `/login` page of a Pilcrow instance. 2. **Without touching the username or password fields**, click `sign in`. The client _should_ send a request to `/api/auth/login` with the following payload: ```json { "name": "", "password": "" } ``` However, it instead sends an empty payload, leading to a 422 Unprocessable Content response as the request is missing required fields. Subsequent requests, or any request after the user enters data in the input fields, are correctly serialized. Merges login-form-nulls into main.
Diffstat (limited to 'git-hooks/pre-commit')
0 files changed, 0 insertions, 0 deletions