`POST /register downcases capitals in usernames` enforces behaviour that spec defines as optional

オープン 初心者向け
#956 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
testing-qa

調査の方向性

tests/csapi/apidoc_register_test.go の79~91行目あたりから始めます。ここでは登録テストが、大文字を含むユーザー名を小文字に変換することを期待しています。この期待を、issue にリンクされた登録仕様にある2つの有効な動作と比較します。どちらの有効なサーバー動作でもテストが通るように更新し、その後、登録テストを実行します。M_INVALID_USERNAME による拒否が受け入れられれば完了です。

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

説明

The spec for POST /_matrix/client/v3/register states that there are two options for handling invalid usernames (like non-lowercase ones):

  1. server MUST either map the provided username onto a user_id in a logical manner, or
  2. reject any username which does not comply to the grammar with M_INVALID_USERNAME.

However, the test fails any servers that do the second option:

  ❌ TestRegistration/parallel/POST_/register_downcases_capitals_in_usernames (40ms)
    apidoc_register_test.go:84: MatchResponse got status 400 want 200 - http://127.0.0.1:32872/_matrix/client/v3/register => {"errcode":"M_INVALID_USERNAME","error":"Username user-UPPER contains disallowed characters or spaces: identifier contains invalid characters"}

https://github.com/matrix-org/complement/blob/7b38a63c9db3337292bee5887fc8533be3a57b9f/tests/csapi/apidoc_register_test.go#L79-L91

主要言語
Go
スター
102
フォーク
73
平均マージ
3日 10時間
マージ済み PR(30日)
6

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

matrix-org/complement のほかの issue

matrix-org/complement の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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