Registration fails "An access token should not be provided on requests to /register"
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
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- api, authentication
Hướng nghiên cứu
Bắt đầu trong matrix_client/api.py tại các lệnh gọi _send và register được hiển thị trong traceback, sau đó xem lại đường dẫn register_with_password trong matrix_client/client.py và các bài kiểm thử hiện có cho guest-account. Tái hiện yêu cầu đăng ký và xác nhận rằng yêu cầu thành công mà không cần access token; bổ sung coverage cho việc đăng ký bằng mật khẩu cùng với các bài kiểm thử hiện tại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Trying to register a new account fails with "An access token should not be provided on requests to /register (except if type is m.login.application_service)", although no token was ever set.
To Reproduce
from matrix_client.client import MatrixClient
matrix = MatrixClient("${homeserverUrl}")
matrix.register_with_password(username="alice", password="foobar")
Expected behavior
Login works fine
Actual behavior
Client side:
Traceback (most recent call last):
File "test.py", line 3, in <module>
matrix.register_with_password(username="alice", password="foobar")
File "/lib/python3.9/site-packages/matrix_client/client.py", line 203, in register_with_password
response = self.api.register(
File "/lib/python3.9/site-packages/matrix_client/api.py", line 160, in register
return self._send(
File "/lib/python3.9/site-packages/matrix_client/api.py", line 748, in _send
raise MatrixRequestError(
matrix_client.errors.MatrixRequestError: 400: {"errcode":"M_UNKNOWN","error":"An access token should not be provided on requests to /register (except if type is m.login.application_service)"}
Server side:
[ 104.741510] synapse[1153]: synapse.http.server: [POST-1] <SynapseRequest at 0x7fc64ed887f0 method='POST' uri='/_matrix/client/r0/register?kind=user' clientproto='HTTP/1.1' site='8448'> SynapseError: 400 - An access token should not be provided on requests to /register (except if type is m.login.application_service)
[ 104.753403] synapse[1153]: synapse.access.http.8448: [POST-1] ::ffff:192.168.1.2 - 8448 - {None} Processed request: 0.010sec/-0.000sec (0.001sec, 0.001sec) (0.000sec/0.000sec/0) 140B 400 "POST /_matrix/client/r0/register?kind=user HTTP/1.1" "matrix-python-sdk/0.4.0" [0 dbevts]
Additional context
This is probably a regression in 0.4.0 related to the addition of use_authorization_header. Also the tests currently only test the creation of guest accounts.
- Ngôn ngữ chính
- Python
- Star
- 266
- Fork
- 118
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của matrix-org/matrix-python-sdk
-
Archive this repository Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 25/100
matrix-org/matrix-python-sdk#330 · 3 reaction ·
-
Message Delete Method Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
matrix-org/matrix-python-sdk#326 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 55/100
matrix-org/matrix-python-sdk#324 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
matrix-org/matrix-python-sdk#319 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
matrix-org/matrix-python-sdk#318 · 2 bình luận ·
Tất cả issue của matrix-org/matrix-python-sdk
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stephrobert/dsoxlab#238 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
sublimehq/package_control#1780 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
nwg-piotr/nwg-displays#145 ·