Invitations: an existing account gets a registration link, and unchecked input creates broken invitees
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 70/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- php
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- JavaScript
- スター
- 5
- フォーク
- 9
- 平均マージ
- 18時間 7分
- マージ済み PR(30日)
- 11
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PlanBCode/hypha のほかの issue
-
Impact: Medium Level: Easy Type: Bug Value: Users
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
Impact: Low Level: Easy Type: Bug Value: Coders
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
PlanBCode/hypha#586 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Impact: Medium Level: Easy Type: Bug Usecase: De Stadsbron Value: Visitors
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
PlanBCode/hypha#522 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
PlanBCode/hypha の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
bug documentation
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
awslabs/visual-asset-management-system#880 ·
メンテナーはふだん 1 日以内に返信
-
04 type: enhancement 33 needs: docs
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
possible bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Mintplex-Labs/anything-llm#6889 ·
メンテナーはふだん 1 日以内に返信