hackmdio / hackmdio/codimd

Failed Login should result in the appropriate HTTP-Status Code

オープン
#657 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
auth provider enhancement upstream
主要言語
JavaScript
スター
10.1k
フォーク
1.1k
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、ログインリクエストのハンドラーと、無効な認証情報に対するそのレスポンスを特定します。issue にはファイルパスもテストパスも記載されていません。ログインの失敗を再現し、200 OK を報告するページにリダイレクトするのではなく、適切な機械可読の 4xx レスポンスを返すことを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
api, authentication
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。