`register_rejects_if_user_already_exists` does not account for implementations requiring auth before performing validation

Đang mở Phù hợp với người mới
#955 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
testing

Hướng nghiên cứu

Tìm TestRegistration/parallel/POST_/register_rejects_if_user_already_exists trong các bài kiểm thử đăng ký và đọc cách nó xử lý phản hồi /register. Cập nhật bài kiểm thử để hoàn tất thử thách xác thực tương tác nếu có thử thách được trả về, sau đó kiểm tra rằng việc đăng ký từ chối người dùng trùng lặp. Hoàn thành khi bài kiểm thử bao phủ cả trường hợp bị từ chối trực tiếp và thử thách UIA theo sau bởi việc từ chối.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

TestRegistration/parallel/POST_/register_rejects_if_user_already_exists fails if the homeserver returns a UIA challenge instead of outright rejecting the request due to the duplicate user. Continuwuity, for example, still rejects the request as expected after completing UIA, but interactive auth is required before it is willing to progress further:

$ curl --json '{"username": "nex", "password": "hello world"}' 10.11.10.134:8008/_matrix/client/v3/register
{"flows":[{"stages":["m.login.registration_token"]}],"params":{},"session":"redacted"}%                                                                                                    $ curl --json '{"username": "nex", "password": "hello world", "auth": {"type": "m.login.registration_token", "token": "redacted", "session": "redacted"}}' 10.11.10.134:8008/_matrix/client/v3/register
{"errcode":"M_USER_IN_USE","error":"Username is not available."}

There's no spec that defines what order these two things should be checked in, so the test should probably try to complete the challenge if it receives one.

Ngôn ngữ chính
Go
Star
102
Fork
73
Merge trung bình
3 ngày 10 giờ
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của matrix-org/complement

Tất cả issue của matrix-org/complement

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.