Invitations: an existing account gets a registration link, and unchecked input creates broken invitees
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 70/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- php
- Lĩnh vực
- authentication
Hướng nghiên cứu
Start with settingspage::invite() in system/datatypes/settings.php around line 112, then read the member list logic around line 676 and the related user and mail functions. Trace the supplied reproduction cases for existing accounts, comma-separated addresses, and empty input. Done means invalid or existing-account addresses are handled safely, users are added once, and pending invitees display correctly.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
settingspage::invite() (system/datatypes/settings.php:112) does not check what it gets:
- Address of an existing account.
hypha_addUser()refuses the address (user exists), but the result is ignored;hypha_getUserByEmail()then returns the existing account andhypha_addUserRegistrationKey()gives that account a registration key. The invitation mail goes to the owner of the account with asettings/register/<key>link, through which the user name, password, e-mail and language of that account can be set. Any member can do this for any account, including an administrator's. Together with #425 (invitation keys fromuniqid(), never expiring) this leaves a standing password-reset link on accounts that did not ask for one. - No validation of the input. The field is split on
,withouttrim()orfilter_var().[email protected], [email protected]stores the second address with a leading space;sendMail()then refuses it, but the invitee is kept. An empty field creates an invitee without an address. hypha_addUser()is called twice per address (lines 119 and 123); for an empty address the second call creates a second, empty user without key.- The member list shows invitation pending only for
rights == 'invite'(line 676), but invitees haverights="invitee", so an open invitation shows as a row with empty name columns.
Steps to reproduce. Log in as a member, settings → invite: (1) the administrator's address: the administrator account gets a key attribute and an invitation mail; (2) [email protected], [email protected]: the second invitee has email=" [email protected]"; (3) an empty field: two users without address are added.
Tested on PHP 8.2, 8.4 and 8.5 with a fictional test site (main, d97ab7b). Suggested direction: trim and validate each address, refuse addresses that already belong to an account (or only re-send for invitees), call hypha_addUser() once and compare with 'invitee' in the member list.
- Ngôn ngữ chính
- JavaScript
- Star
- 5
- Fork
- 9
- Merge trung bình
- 18 giờ 7 phút
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 PlanBCode/hypha
-
Component: User interface Impact: Low Level: Easy Pagetype: Peer reviewed article Type: Bug Value: Visitors
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Impact: Medium Level: Easy Type: Bug Value: Users
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Impact: Low Level: Easy Type: Bug Value: Coders
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
PlanBCode/hypha#586 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của PlanBCode/hypha
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Aethelgard-Systems/agent-postbox#32 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
SamuelNDCE/plume#42 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[UI] Theme Provider Props table overflows on mobile viewportsCó thể đã có người làm @SajanBisht đã nhận hôm nay. Đang mởframework/gatsby help wanted kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
layer5io/layer5#8264 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày