Failed Login should result in the appropriate HTTP-Status Code
- Vorherrschende Sprache
- JavaScript
- Sterne
- 10.1k
- Forks
- 1.1k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Right now, If you try to login with weird credentials, you'll receive an HTTP 302 redirect and get back to the root of the project. Which will happily claim to be HTTP 200 OK. At no point is there a machine-readable mentioning of the failed login.
This is bad for at least two reasons: You can't properly script a login and browsers will offer to save your credentials, even if they are faulty.
I would like to suggest to change this to actually at some point reply with a HTTP 400-ish response code. Perhaps 401 Unauthorized.
Beitragsleitfaden
Rechercherichtung
Start by locating the login request handler and its response for invalid credentials; the issue provides no file or test path. Reproduce a failed login and verify that it returns an appropriate machine-readable 4xx response rather than redirecting to a page that reports 200 OK.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- api, authentication
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100